| Author |
change Border color of JTAbbedPane and selection of TabbedPane..Plz solve Problem
|
sandhiya sindhi
Ranch Hand
Joined: Sep 25, 2003
Posts: 50
|
|
Dear folks, how can i change the Border Color of Tabbedpane. 2) i have set background color of TabbedPane but when i select TAb than background color changed and again became java's ray color.. so what can i do for both of problems. thankz [ October 28, 2003: Message edited by: sandhiya Laghari ]
|
 |
sandhiya sindhi
Ranch Hand
Joined: Sep 25, 2003
Posts: 50
|
|
Any One pleaseee Help mee i have find in JAva Api too but i find nothing for such problem. andi didnt get anything related this from google search site too. please kindly help me
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
I'm not 100% on this as I am hunting my brain for the answer, but I think something at least like this will work. This must be done before the creation of your JTabbedPane(s)
|
 |
sandhiya sindhi
Ranch Hand
Joined: Sep 25, 2003
Posts: 50
|
|
sir, THank u very much for my help but how can i add it. can u please give me its little example.because i wtire same code as it is in my programe, it is not working. and sir how can i change bordercolor of tabbedpane too. waiting ur Reply
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Originally posted by sandhiya Laghari: sir, THank u very much for my help but how can i add it. can u please give me its little example.because i wtire same code as it is in my programe, it is not working. and sir how can i change bordercolor of tabbedpane too. waiting ur Reply
If you show me the code you have so far, I can help you make corrections to that.
|
 |
sandhiya sindhi
Ranch Hand
Joined: Sep 25, 2003
Posts: 50
|
|
dear sir, thanx for ur response.. u have asked me about Code . here is an example code. now in which u can feel a white outline on JTabbedPane... how can i change its that color. and when u select JTAbbedPane its color vanished and gray comes again at selecting time. now please kindly help me sir.. import java.awt.*; import javax.swing.*; import java.awt.event.*; public class testTabbedPane extends JFrame { JTabbedPane tabPane; JPanel indexPanel, thesPanel,classPanel,confPanel,gramPanel; Color color1 = new Color(20,83,162); Color colorTab= new Color(69,92,159); public testTabbedPane() { tabPane=new JTabbedPane(); tabPane.setBackground(colorTab); //UIManager.put("tabPane.selected", Color.black); indexPanel= new JPanel(); thesPanel= new JPanel(); classPanel= new JPanel(); confPanel = new JPanel(); gramPanel = new JPanel(); indexPanel.setBackground(color1); thesPanel.setBackground(color1); classPanel.setBackground(color1); confPanel.setBackground(color1); gramPanel.setBackground(color1); Icon indexIcon= new ImageIcon("index.gif"); Icon thesisIcon= new ImageIcon("thesis.gif"); Icon classIcon= new ImageIcon("class.gif"); Icon confIcon= new ImageIcon("conf.gif"); Icon gramerIcon= new ImageIcon("gramer.gif"); tabPane.addTab("Index",indexIcon,indexPanel); tabPane.addTab("Thesas",thesisIcon,thesPanel); tabPane.addTab("Class",classIcon,classPanel); tabPane.addTab("Confugration",confIcon,confPanel); tabPane.addTab("Grammer",gramerIcon,gramPanel); Container cont= getContentPane(); cont.add(tabPane,BorderLayout.CENTER); addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); }}); setSize(200,300); show(); } public static void main(String[] s) { new testTabbedPane(); } } Thank You very much Your response and again awaiting ur reply
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Corrections:
|
 |
sandhiya sindhi
Ranch Hand
Joined: Sep 25, 2003
Posts: 50
|
|
Hello Dear sir...... Wowww sir it is workingggg. u r great sir.. Thank you veryyyy much sir. Sir how can i remove its Border line which has while color(java's default color); THank u very much sir
|
 |
 |
|
|
subject: change Border color of JTAbbedPane and selection of TabbedPane..Plz solve Problem
|
|
|