HI all . .I created some Desctop App and ahe several classes. On main class NameProectView a have some variables like buttons, mainPanel ... But I need to reach them from other classes.. For Example when I try create new object of this class in another class it gaves an Error ..

NameProectView nw = new NameProectView(null);

like this..and i donw know what to write in barrecets.. null or this? when i wrote this it doesnt work also..

I thougt that this objects tryes to create new window or something ..but is there any other way that can i erach variables in this calss? also they are generated from compiler when I add from tool box..

And here is error..

SEVERE: Application class diagrameditor.DiagramEditorApp failed to launch
java.lang.IllegalArgumentException: null application
at org.jdesktop.application.View.<init>(View.java:79)
at org.jdesktop.application.FrameView.<init>(FrameVie w.java:23)
at diagrameditor.DiagramEditorView.<init>(DiagramEdit orView.java:34)
at diagrameditor.DrawPanel.<init>(DrawPanel.java:33)
at diagrameditor.DiagramEditorView.<init>(DiagramEdit orView.java:338)
at diagrameditor.DiagramEditorApp.startup(DiagramEdit orApp.java:19)
at org.jdesktop.application.Application$1.run(Applica tion.java:171)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)