chakradhar
color changing
1 Answer(s)      3 years and a month ago
Posted in : Java Beginners

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 Pages:
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
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
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
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...
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
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...
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
UITableView Background Color
]; The above line will change the default background color into gray color. You can also set the gradient to it. In this example we are simply changing the color...UITableView Background Color To change the background color of UITableView
How to change the color of a base64-encoded png image JQuery?
the value of imgd.data[i] (before changing the color), it is zero for every i. the original image is shown, but the color does not change. Do you know why...How to change the color of a base64-encoded png image JQuery?  I am
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
Java Servlet Change Background Color
Java Servlet Change Background Color You can provide an effective way to the web page by changing the background color of the web page. In servlet, you can do this by using javascript. Here, we are going to change the background color
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
jquery color picker plugin
type, directly implement the color picker on web page. Second, by changing...Color picker jQuery plug-in In this section, you will learn how to implement color picker in your web page using jQuery plug-in. In the given below example
iphone Button Action (changing background of window)
iphone Button Action (changing background color of window)   In this tutorial we will change the background color on clicking the button...;setOrangeColor" as the setter function. The IBAction methods set the background color
Color
to create new colors, and predefines a few color constants (see below.... White is (255, 255, 255) and black is (0,0,0). Color Constants Java originally defined a few color constant names in lowercase, which violated
Changing root Password
Changing root Password  how do i change the root password in mysql
changing an image based on checking checkbox using HTML & JavaScript, Please put div blocks
changing an image based on checking checkbox using HTML & JavaScript, Please put div blocks   Hello, PLease check the below code, and let me know...; <h3 style="text-align: left; color: #286da1; padding-top: 0px;">
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 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
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 change
color change  how to change the color in circle using scrollbar
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
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
div background color in html
div background color in html   How to change the background color of DIV in HTML
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
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
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
HTML document's background color
HTML document's background color  How to set a HTML document's background color
uiscrollview background color
uiscrollview background color  Is it possible to set the uiscrollview background color in iPhone application
Get image color
Get image color  How to get image color in iPhone SDK application
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
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
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.... Color: Choose "f30011" color and Ellipse tool (U key) to draw

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.