Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Swing Tabbed Pane background color ignored
Swing Tabbed Pane background color ignored [message #607839] Fri, 27 May 2005 13:46
Eclipse UserFriend
Originally posted by: richard.pimentel.hci.utah.edu

the problem I am having is the background color I am setting for a Swing
tabbed pane is ignored when I run the application. The color is correct in
VE and when I change it is dutifully changed in VE but when I run the app
it the tab is always the default grey. I am using the following versions:

Eclipse SDK 3.0.2
EMF Runtime 2.0.2
GEF Runtime 3.0.1
VE Runitme M2050504

I have included code from the main class. It instances another visual
class (Extract) that is composed of a pane with several panels, buttons,
etc. Any help with this would be appreciated.

-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-

package ManualMergeExtract;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;

public class MainFrame extends JFrame
{
private JTabbedPane tabbedPane = null;
private Extract extractPane = null;

/**
* This method initializes jTabbedPane
*
* @return javax.swing.JTabbedPane
*/
private JTabbedPane getTabbedPane() {
if (tabbedPane == null) {
try {
tabbedPane = new JTabbedPane();
extractPane = new Extract();
tabbedPane.addTab("Extract", extractPane);
tabbedPane.setFont(new java.awt.Font("MS Sans Serif",
java.awt.Font.PLAIN, 12)); // Generated
tabbedPane.setBackground(new java.awt.Color(236,233,216)); // Generated
}
catch (java.lang.Throwable e) {
// TODO: Something
}
}
return tabbedPane;
}

public static void main(String[] args)
{
new MainFrame();
}

public MainFrame() {
super();
initialize();
}

private void initialize() {
this.setBackground(java.awt.Color.white); // Generated
this.setName("mainFrameTPane"); // Generated
this.setFont(new java.awt.Font("MS Sans Serif", java.awt.Font.PLAIN,
12)); // Generated
this.setSize(620, 700);
this.setTitle("Extract-O-Merge"); // Generated
this.setContentPane(getTabbedPane()); // Generated
this.setVisible(true); // Generated
}
} // @jve:decl-index=0:visual-constraint="10,10"
Previous Topic:JFrame | VE not visible
Next Topic:VE Update Manager on the Web Page
Goto Forum:
  


Current Time: Mon Jun 16 17:34:00 EDT 2025

Powered by FUDForum. Page generated in 0.04384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top