@Override public void setStatus(boolean on) { if (on) { iconLabel.setIcon(onIcon); getContentPane().setBackground(Constants.GREEN_DARK); setTitle("Status: ON"); } else { iconLabel.setIcon(offIcon); getContentPane().setBackground(Color.BLACK); setTitle("Status: OFF"); } }
GridPanelFrame(int width, int height) throws HeadlessException { setUndecorated(true); setResizable(false); setPreferredSize(new Dimension(width, height)); getContentPane().setBackground(Color.BLACK); getContentPane().setLayout(new GridLayout(1,1)); }
content.setBackground(Color.lightGray);
pane.setBackground(Color.yellow); int n = args.length; String e;
if (p instanceof JWindow || p instanceof Panel) { p.setBackground(contents.getBackground()); this.heavyWeightContainer = p; break;
introPane.setBackground(Color.white); String aText = Content.extractResourceToString("/gui", "toolIntro.html"); JLabel introText = new JLabel(aText);
pBox.setBackground(Color.white); status.setOpaque(true); status.setBackground(Color.white);
private void RenkMouseClicked(java.awt.event.MouseEvent evt) { renk = JColorChooser.showDialog(null, "Select the background color", renk); Container a = this.getContentPane(); a.setBackground(renk); }
public void actionPerformed(ActionEvent e) { Container contentPane = getContentPane(); if (!on) { contentPane.setBackground(Color.YELLOW); on = true; } else { contentPane.setBackground(Color.DARK_GRAY); on = false; } }
public Hangman() { Container c = getContentPane(); c.setBackground(Color.BLACK); JTextField input = new JTextField(20); c.setLayout(new BorderLayout()); c.add(input, BorderLayout.SOUTH); }
public static void main(String[] args) throws Throwable { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); Container cp = frame.getContentPane(); cp.setBackground(Color.RED); cp.setLayout(new FlowLayout()); cp.add(new JLabel(new ImageIcon(new URL("http://i.stack.imgur.com/BvYxM.png")))); cp.add(new JLabel(new ImageIcon(new URL("http://www.axdn.com/redist/axpssp_logo.png")))); frame.pack(); frame.setVisible(true); }
public void save(String fileName) throws IOException, PrintException { JFrame dialog = new JFrame(); Container contentPane = dialog.getContentPane(); ((JComponent) contentPane).setBorder(BorderFactory.createEmptyBorder( 10, 10, 10, 10)); contentPane.add(this); contentPane.setBackground(Color.white); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.dispose(); GraphicsSupport.saveImage(this, fileName); }
public void save(String fileName) throws IOException, PrintException { JDialog dialog = new JDialog(); Container contentPane = dialog.getContentPane(); ((JComponent) contentPane).setBorder(BorderFactory.createEmptyBorder( 10, 10, 10, 10)); contentPane.add(this); contentPane.setBackground(Color.white); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.dispose(); GraphicsSupport.saveImage(this, fileName); }
public DCGlassPane(final JRootPane rootpane) { _rootPane = rootpane; _glassPane = (Container) rootpane.getGlassPane(); _glassPane.setLayout(null); _glassPane.setBackground(WidgetUtils.BG_COLOR_DARKEST); }
public void save(String fileName) throws IOException, PrintException { JDialog dialog = new JDialog(); Container contentPane = dialog.getContentPane(); ((JComponent) contentPane).setBorder(BorderFactory.createEmptyBorder( 10, 10, 10, 10)); contentPane.add(this); contentPane.setBackground(Color.white); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.dispose(); GraphicsSupport.saveImage(this, fileName); }
public void save(String fileName) throws IOException, PrintException { JFrame dialog = new JFrame(); Container contentPane = dialog.getContentPane(); ((JComponent) contentPane).setBorder(BorderFactory.createEmptyBorder( 10, 10, 10, 10)); contentPane.add(this); contentPane.setBackground(Color.white); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.dispose(); GraphicsSupport.saveImage(this, fileName); }
/** Creates new form SpringXMLConfigGroupVisual */ public SpringXMLConfigGroupVisual(List<ConfigFileGroup> configFileGroups) { initComponents(); groupsTable.getParent().setBackground(groupsTable.getBackground()); groupsTable.setModel(new ConfigGroupSelectionTableModel(configFileGroups)); groupsTable.getColumnModel().getColumn(0).setMaxWidth(0); groupsTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); }
public SpringXMLConfigNamespacesVisual() { initComponents(); // set the color of the table's JViewport includesTable.getParent().setBackground(includesTable.getBackground()); TableColumn col1 = includesTable.getColumnModel().getColumn(0); col1.setMaxWidth(0); includesTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); includesTable.revalidate(); // springLibrary = SpringUtilities.findSpringLibrary(); }
public AbstractWindow(final WindowContext windowContext) { _windowContext = windowContext; setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT)); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener(this); getContentPane().setBackground(WidgetUtils.BG_COLOR_BRIGHT); }
private void init() { setOpaque(true); getContentPane().setBackground(JKColors.MAIN_PANEL_BG); setBackground(JKColors.MAIN_PANEL_BG); setDefaultCloseOperation(DISPOSE_ON_CLOSE); // setExtendedState(MAXIMIZED_BOTH); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); // setLocationRelativeTo(null); setComponentOrientation(SwingUtility.getDefaultComponentOrientation()); }