Hi,
One thing that I noticed is the default behaviour of the tabbedPane buttons is set to opaque false.
In the image 1 that i attached thats a simple java program which has the buttons color set to the panel color, i thought it was the default behaviour of the tabbedPane buttons.
now i set the opaque to true, i see the real color of the buttons and they are the JideButton colors. I have attached the sample code below which does the same.
Can we set the default proeprty for the application, so that where ever the JideButton is created in FloorTabbedPane set the opaque to true? This would make my application to have the same button color through out, so that it does not depend on the background color on which it is placed, I am not good at framing sentences, Please let me know if the above is not clear.
- Code: Select all
import java.awt.Dimension;
import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTree;
import javax.swing.UIManager;
import com.jidesoft.pane.FloorTabbedPane;
import com.jidesoft.plaf.LookAndFeelFactory;
import com.jidesoft.swing.ButtonStyle;
import com.jidesoft.swing.JideButton;
import com.jidesoft.utils.SystemInfo;
public class Test {
static {
try {
if (SystemInfo.isLinux() || SystemInfo.isUnix()) {
UIManager.setLookAndFeel(LookAndFeelFactory.METAL_LNF);
} else {
UIManager.setLookAndFeel(UIManager
.getSystemLookAndFeelClassName());
}
} catch (final Exception e) {
}
// Extend the L&F for JIDE components
LookAndFeelFactory
.installJideExtension(LookAndFeelFactory.OFFICE2003_STYLE);
}
public static void main(final String[] args) {
final JFrame frame = new JFrame();
final JPanel panel = new JPanel();
final FloorTabbedPane tabs = new FloorTabbedPane() {
@Override
protected AbstractButton createButton(final Action arg0) {
final JideButton button = (JideButton) super.createButton(arg0);
button.setOpaque(true);
return button;
}
};
tabs.setSteps(2);
tabs.setPreferredSize(new Dimension(100, 300));
panel.add(tabs);
tabs.addTab("Networks", new JTree());
tabs.addTab("Locations", new JTree());
frame.add(panel);
frame.pack();
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}