Hi, keine Ahnung ob das schon jemand probiert hat, aber ich will ein HudWindow mit einem Button und einem Label erstellen, aber der Button und das Label wird nicht angezeigt…
kann mir da jemand helfen?
import com.explodingpixels.macwidgets.HudWidgetFactory;
import com.explodingpixels.macwidgets.HudWindow;
import java.awt.EventQueue;
import java.awt.event.ComponentListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class hud {
public static void main(String[] args) {
//Use the event dispatch thread for Swing components
EventQueue.invokeLater(new Runnable()
{
@Override
public void run()
{
hud();
}
});
}
public static void hud() {
HudWindow hud = new HudWindow("Window");
hud.getJDialog().setSize(300, 350);
hud.getJDialog().setLocationRelativeTo(null);
hud.getJDialog().setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
hud.getJDialog().setVisible(true);
JLabel label = HudWidgetFactory.createHudLabel("Label");
JButton button = HudWidgetFactory.createHudButton("Button");
hud.getJDialog().add(label);
hud.getJDialog().add(button);
hud.getContentPane().add(button);
}
}