ok, also mit kleinen (aus platzgründen) kürzungen
public static void addComponents (Container cont){
cont.setLayout(null);
JMenuBar mb = new JMenuBar();
...
ein paar buttons...
....
area = new TextArea("",10000,1000,area.SCROLLBARS_VERTICAL_ONLY);
area.setBounds(10,120,830,330);
area.setEditable(true);
...
cont.add(mb);
cont.add(area);
}
public static void createAndShowGUI() {
JLabel backImgPanel = new JLabel(new ImageIcon("C:/backr.png"));
backImgPanel.setLayout(null);
backImgPanel.setOpaque(false);
backImgPanel.setBounds(0,0,850,600);
frame = new JFrame("...");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
clipboard = frame.getToolkit().getSystemClipboard();
addComponents(frame.getContentPane());
frame.getContentPane().add(backImgPanel);
Dimension frameSize = new Dimension(850,600);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int top = (screenSize.height - frameSize.height) / 2;
int left = (screenSize.width - frameSize.width) / 2;
Insets insets = frame.getInsets();
frame.setSize(frameSize);
frame.setLocation(left, top);
frame.setIconImage(new ImageIcon("C:/icon.png").getImage());
frame.setResizable(false);
frame.setUndecorated(true);
frame.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
AWTUtilities.setWindowOpaque(frame, false);
frame.setVisible(true);
}
public static void main(String[] argv){
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
}
catch (Exception ex) {
ex.printStackTrace();
}
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
das wär soweit das elementare
wie gesagt
die menubar, buttons, labels... alles bleibt sichtbar
nur die area verschwindet mit!
Danke
lg