Habe ich auch im Eclipse: Lösung:
Rechtsklick aufs Projekt -> Properties -> Java Build Path:
Da steht bei mir standartmäßig: [c]JRE System Library[JavaSE-1.6][/c]
diese auswählen und rechts auf [REMOVE] drücken.
danach auf:
Add Library... -> JRE System Library -> [Next]
dort wählst du den punkt: Workspace default JRE (jre6) aus und klickst auf [Finish]
dann kannst kannst du AWTUtilities so verwenden:
[code=Java]final JFrame frame = new JFrame("test");
AWTUtilities.setWindowOpaque(frame, true);
AWTUtilities.setWindowOpacity(frame, 0.4F);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
panel.setLayout(null);
JButton button = new JButton("hallo");
button.setLocation(10, 10);
button.setSize(100, 20);
panel.add(button);
frame.add(panel);
frame.setSize(300, 300);
SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()
{
frame.setVisible(true);
}
});[/code]
MFG
Tomate_Salat