aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Trying to get jar to run GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Trying to get jar to run GUI" Watch "Trying to get jar to run GUI" New topic
Author

Trying to get jar to run GUI

Anthony Schmitt
Ranch Hand

Joined: Nov 17, 2009
Posts: 37
OK, full disclosure, I'm REALLY new to JAVA and my code will probably make some of you scream in agonizing pain. If you see something I can improve on, such as taking all these strings and combining them somehow so all of my buttons have access to variables like tn, newtn, origtn, coe, newcoe, origcoe, that'd be wonderful.

I've also had a hell of a time figuring out how to get my if then statements working. I want to check to see if textfield is empty, else run through the checks for which radio button is selected, but that seems to throw errors. Maybe because I'm checking the state of a textfield in one part of my if statements and radio buttons in the next part?

I wanted to put a jbutton in to copy my ReturnField text, but don't know how to plug that code into a button.

ABOVE ALL ELSE, I need to figure out why the only way I can see my GUI is by clicking run in Netbeans. Running the jar just... runs it. No GUI:
java -jar "C:\My Documents\NetBeansProjects\SwitchOverlay\dist\SwitchOverlay.jar" = no GUI popping up.




Anthony Schmitt
Ranch Hand

Joined: Nov 17, 2009
Posts: 37
Figured out the GUI. SwitchOverlay.java is an unnecessary file. Set it to run OverlayGUI.java, built, and run fine.
Anthony Schmitt
Ranch Hand

Joined: Nov 17, 2009
Posts: 37
Got the copy button to work, too.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Trying to get jar to run GUI