color changing

color changing

sir how to change the color of the selected tab in java swing
View Answers

April 10, 2010 at 4:30 PM

Hi Friend,

Try the following code:

import javax.swing.*;
import java.awt.*;
import javax.swing.event.*;
import java.awt.event.*;

public class CreateTabbedPane{
public static void main(String[] args){
JFrame frame = new JFrame("Tabbed Pane Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
UIManager.put("TabbedPane.selected", Color.blue);
JTabbedPane tab = new JTabbedPane();
frame.add(tab, BorderLayout.CENTER);
tab.add("Tab 1", new JLabel("This is Tabbed Pane 1"));
tab.add("Tab 2", new JLabel("This is Tabbed Pane 2"));
tab.add("Tab 3", new JLabel("This is Tabbed Pane 3"));
tab.add("Tab 4", new JLabel("This is Tabbed Pane 4"));
frame.setSize(400,100);
frame.setVisible(true);
}
}

Thanks









Related Tutorials/Questions & Answers:
changing uiview background color
changing uiview background color  changing UIView background color in ios   self.view.backgroundColor = [UIColor colorWithRed:244.0f/255.0f green:230.0f/255.0f blue:183.0f/255.0f alpha:1.0f
changing selection color of <button>
changing selection color of   dear all, i have loaded image in border less button tag when button is selected with tab key i get brown color rectangle around image. how do i change color of that rectangle from brown to white
Advertisements
color changing - Java Beginners
color changing  sir how to change the color of the selected tab in java swing  Hi Friend, Try the following code: import javax.swing.*; import java.awt.*; import javax.swing.event.*; import java.awt.event.
Changing background color using JavaScript
Changing background color using JavaScript  Hi Sir Is there any way to change the background color using JavaScript ? Please mention code with your answer.   Hello Friend Pass the element & color in the given
Changing the message box to a specific color
Changing the message box to a specific color  How do you change the message box color to a specific color? I can get the color to change with each input but i cant give it a specific color. Example I'm trying to change
How to design a changing color of the chameleon, changing color of the chameleon, color of the chameleon
How to design a changing color of the chameleon       Have you seen the chameleon to changing the color, you can see now by this example. Let's see how the chameleon
changing Background Color
changing Background Color   ... change background color of a pdf file. You can change the background color of any chunk with the help of setBackground(Color color). 
How to Changing Toolbar Color using iPhone Application ?
How to Changing Toolbar Color using iPhone Application ?  Hi, i have developing a small application to changing the toolbar color in iphone. But i have facing the problem that color is not changing. Can somebody suggest me
changing Chunk Color
changing Chunk Color     ... is a method of FontFactory. We are changing the color of the chunk... change the color of chunk color .This example tell you how you can change
Photoshop eye color brown to blue
Photoshop eye color brown to blue       How to change the eye color from brown to blue If you want to change the eye color but you are not able to do that then this tutorial
changing of data...
servlet.database is not changing in 10 second  hi.... i have created a servlet page using a response.setheader(); method.in the parameter i have... this servlet.database is not changing in 10 second...what should i do..?? reply fast
changing of data...
data changing in 10 second  hi.... i have created a servlet page using a response.setheader(); method.in the parameter i have given 10 second.but... is not changing in 10 second...what should i do..?? reply fast
changing of data...
changing of data...  hi.... i have created a servlet page using a response.setheader(); method.in the parameter i have given 10 second.but once... is not changing in 10 second...what should i do..?? reply fast
UIButton text color
UIButton text color  Hi, I have to change the text color of UIButton to black. Give me best code for changing UIButton text color to black. Thanks
Changing root Password
Changing root Password  how do i change the root password in mysql
Changing 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
color change
color change  how to change the color in circle using scrollbar
Changing pictures - Java Beginners
Changing pictures  I found some html code that allows pictures to be changed on a web page. I copied the code and saved it as an html file. when I... Explorer that have pictures changing on them and they do not get blocked? 
Changing MySQL Port Number
Changing MySQL Port Number  How to change the MySQL port no in windows.   Hi, Open the my.ini file present in the MySQL server installation directory. Change the port number to desired port number. By default port
changing the file content
changing the file content  I have requirement like this, a file contain maximum 1000 lines. I want to cahnage the 501 line content. I know this logic , reading the file content and changeing the 501 line content and crating one
color cycle
color cycle  how do you implement a program for color cycle that has a button such that when i press the button it brings a sequence for example green-red-grey-green e.t.c and should use the getter methods and set methods
Changing Executable Jar File Icon
Changing Executable Jar File Icon  I have created an executable jar file for my java program and the icon that appears is the java icon. I will like to know if there is a way to change this to any icon of my choice.   
Changing JLabel with a jcombobox - Java Beginners
Changing JLabel with a jcombobox  Hi, I have a JLabel which should change when i select an item from JCombobox.I have some calculations after i get a value from the combo,the result of which i have to display using a JLabel I
changing final Boolean value in SwingUtilities.invokeLater()
changing final Boolean value in SwingUtilities.invokeLater()  Hi, I have a problem with setting final Boolean value in second time. But it is necessary to me. Have You any Idea of this Scenario? Here is my code: public
changing primary key of parent table
changing primary key of parent table  I want to change one primary key from a table where primary key is auto created? How can I do that? I have tried UPDATE person SET personid=3494 WHERE personid=8483; and i get the following
Get the color values as a matrix of color image
Get the color values as a matrix of color image  I am new to java and image processing, i want to get the color values as a matrix from the color image for giving input to the compression algorithm by using java. plz provide
UITableView Background Color
changing the color of all the cells or table view background. But you can also draw...UITableView Background Color To change the background color of UITableView...]; The above line will change the default background color into gray color. You can
Line Animation in Java
x  is changing. The rang of the value is -500 to 600. The color of the line is changing by setColor() method. To remove old color and set new one or ...; In this example we are creating an animated line. The color
div background color in html
div background color in html   How to change the background color of DIV in HTML
Highlight text by changing color on every click(Toggle effect)
Highlight text by changing color on every click(Toggle effect..., it gets highlighted by changing it's color. If you click already highlighted list element ,it also change it's color. The color sequence or toggle
ModuleNotFoundError: No module named 'color'
ModuleNotFoundError: No module named 'color'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'color' How to remove the ModuleNotFoundError: No module named 'color'
ModuleNotFoundError: No module named 'color'
ModuleNotFoundError: No module named 'color'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'color' How to remove the ModuleNotFoundError: No module named 'color'
ModuleNotFoundError: No module named 'color'
ModuleNotFoundError: No module named 'color'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'color' How to remove the ModuleNotFoundError: No module named 'color'
how to reverse a string without changing its place
how to reverse a string without changing its place  how to reverse a string without changing its place   Hi Friend, Another way of reversing string: import java.util.*; public class ReverseString{ public static
UITextfield Background Color
is ..it's showing a background color. Though my text field color is white. Can you please suggest.. , how can i remove the background color of text field. Thanks!   iPhone UITextField Background Color Set the text field background color
font changing
ANSI Color Codes with Python
ANSI Color Codes with Python   Use ANSI codes to play with colors and styles. Create a program that will spit out a user inputted string in a color, style, or background color that they can choose. To do this, you'll need
select the foreground color for a label
select the foreground color for a label  (Using JScrollBar) Write a program that uses scroll bars to select the foreground color for a label, Three... of the color. Use a title border on the panel that holds the scroll bars
Color Wheel - Java Beginners
Color Wheel  Hai to all... Just want to need some code about the GUI, were using the java.lang and java.awt.. Were making a color wheel program.. Thank'z to all who help me... GOD bless
color coding in java
color coding in java  hii..can anyone please help with auto coloring code in java swings..??a particular text field should have a particular color for a particular event..plzz help
Changing from Struts 1.2 to Struts 2.0 in Application
Changing from Struts 1.2 to Struts 2.0 in Application  Hi All, We have a financial application which is running successfully on struts 1.2 and java 1.4. Since this are old versions and obsoleted from market. We want to use
uiscrollview background color
uiscrollview background color  Is it possible to set the uiscrollview background color in iPhone application
HTML document's background color
HTML document's background color  How to set a HTML document's background color
Get image color
Get image color  How to get image color in iPhone SDK application
How to set the Gradient Color as a background color for Java Frame?
How to set the Gradient Color as a background color for Java Frame?  How to set the Gradient Color as a background color for Java Frame
jframe background color not showing
jframe background color not showing  jframe background color is not showing. please suggest.   Just add the background color to JPanel and then add it to JFrame. For example .. JFrame myFrame = new JFrame(); JPanel
Changing random results to ASC or DSC - SQL
Changing random results to ASC or DSC  I have a script that randomizes results. I have tried to convert code to display a constant result, ascending or descending while in session. I can't seem to convert script due to session
Changing loacation for file object - JSP-Servlet
Changing loacation for file object  Hai, For uploading a file i used the FileOutputStream() method. And uploading works perfectly... Foundation\Tomcat 6.0\webapps\mca2006sfssjc.co.in\stud\images by changing
HTML Color Code for White
HTML Color Code for White In this page you will find the hexadecimal color code for White color. The hexadecimal color code for white is #FFFFFF or #ffffff. For most website white color is used as the background of the web page
How to design a color in the bucket, design a color in the bucket, color in the bucket
How to design a color in the bucket       Fill color in the blank bucket by taking help..._TO_REPLACE_1 Color: Choose "f30011" color and Ellipse tool (U

Ads