Text « JTabbedPane « Java Swing Q&A





1. how to change the color of text of tab on mouse over of JtabbedPane?    stackoverflow.com

I need to change the color of text of tab of JtabbedPane on MouseOver. Is is possible using the Mouse Listener or is there any different property to do that? Thanks Jyoti

2. Formatting text with nodefault tabs    coderanch.com

Hi everybody! I really need some help... I use Jdbtextpane to edit text and then to save it on db. I had to format data with some decimal alignment tabs; as users press AltT I insert a tab and change next tabstop in the Tabset to be decimal aligned. I save it on db by inserting a tag before the \t ...

3. changing text color on selected JTabbedPane tab    coderanch.com

import java.awt.*; import javax.swing.*; class Testing extends JFrame { public Testing() { UIManager.put("TabbedPane.selected", Color.green); setLocation(300,200); setDefaultCloseOperation(EXIT_ON_CLOSE); JTabbedPane tp = new JTabbedPane(){ public Color getForegroundAt(int index){ if(getSelectedIndex() == index) return Color.BLACK; return Color.WHITE; } }; tp.setBackground(Color.BLACK); tp.addTab("Tab A",new JPanel()); tp.addTab("Tab B",new JPanel()); tp.addTab("Tab C",new JPanel()); getContentPane().add(tp); setSize(200,250); } public static void main(String[] args){new Testing().setVisible(true);} }