Hey guys, i try to get my program to open a new GUI window with click on the button.
I think this is the problem. But i don't know how to fix it.private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { ServerGUI s = new ServerGUI(); s.setVisible(true);
Plzzz help anyone.
Im sorry if i do something wrong with the post (my first time i post).
--- Update ---
Sorry guys forgot rest of the Exception:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet.
at socialnetværksprogrammet.ServerGUI.<init>(ServerGU I.java:62)
at socialnetværksprogrammet.Home.jButton2ActionPerfor med(Home.java:499)
at socialnetværksprogrammet.Home.access$300(Home.java :13)
at socialnetværksprogrammet.Home$4.actionPerformed(Ho me.java:388)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.jav a:6527)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3321)
at java.awt.Component.processEvent(Component.java:629 2)
at java.awt.Container.processEvent(Container.java:223 4)
at java.awt.Component.dispatchEventImpl(Component.jav a:4883)
at java.awt.Container.dispatchEventImpl(Container.jav a:2292)
at java.awt.Component.dispatchEvent(Component.java:47 05)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4462)
at java.awt.Container.dispatchEventImpl(Container.jav a:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739 )
at java.awt.Component.dispatchEvent(Component.java:47 05)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 716)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:82)