Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to get jar to run GUI

 
Anthony Schmitt
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured out the GUI. SwitchOverlay.java is an unnecessary file. Set it to run OverlayGUI.java, built, and run fine.
 
Anthony Schmitt
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the copy button to work, too.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic