List of usage examples for javax.swing JInternalFrame setForeground
@BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.") public void setForeground(Color fg)
From source file:de.codesourcery.jasm16.ide.ui.viewcontainers.Perspective.java
@Override public IView addView(final IView view) { if (view == null) { throw new IllegalArgumentException("view must not be NULL"); }//ww w . jav a 2s. co m final JInternalFrame internalFrame = new JInternalFrame(view.getTitle(), true, true, true, true); internalFrame.setBackground(Color.BLACK); internalFrame.setForeground(Color.GREEN); internalFrame.getContentPane().add(view.getPanel(this)); SizeAndLocation sizeAndLoc = applicationConfig.getViewCoordinates(getUniqueID(view)); if (sizeAndLoc != null) { internalFrame.setSize(sizeAndLoc.getSize()); internalFrame.setLocation(sizeAndLoc.getLocation()); } else { internalFrame.setSize(200, 150); internalFrame.setLocation(0, 0); internalFrame.pack(); } internalFrame.setVisible(true); final InternalFrameWithView frameAndView = new InternalFrameWithView(internalFrame, view); final InternalFrameListener listener = new InternalFrameAdapter() { @Override public void internalFrameClosing(InternalFrameEvent e) { disposeView(view); } }; internalFrame.setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE); internalFrame.addInternalFrameListener(listener); views.add(frameAndView); desktop.add(internalFrame); return view; }