wie lässt es sich einstellen, dass die jtoolbar, direkt ab programmstart an, an bestimmten koordinaten "floates"? (also, ohne dass der user erst die jtoolbar wegziehen muss)
EDIT: habe hier im forum folgenden code gefunden:
allerdings wird dann immer eine nullpointerexception geworfen (scheint nicht nur mir so zu gehe: http://forum.java.sun.com/thread.jspa?messageID=3953444 (reply 5 of 9)
EDIT: habe hier im forum folgenden code gefunden:
Code:
BasicToolBarUI toolBarUI = (BasicToolBarUI) toolBar.getUI();
toolBarUI = (BasicToolBarUI) toolBar.getUI();
toolBarUI.setFloatingLocation(x,y);
// Position in setFloating wird offenbar nicht ausgewertet
toolBarUI.setFloating(true, new Point(0,0));
allerdings wird dann immer eine nullpointerexception geworfen (scheint nicht nur mir so zu gehe: http://forum.java.sun.com/thread.jspa?messageID=3953444 (reply 5 of 9)
Code:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicToolBarUI.setFloating(BasicToolBarUI.java
:757)
at EditorGui.<init>(EditorGui.java:220)
at Editor.main(Editor.java:12)