Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

from ServerWindow to MainWindow

 
James T John
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there, hopefully my question is simple enough to answer, I've been following the SCJD Exam with J2SE 5 Platform book.
My issue is that the server starts fine, but the MainWindow doesn't open, and the ServerWindow just hangs there. Am I missing something?
(As a note, once I close or exit the server window, my application continues to run and process the underlying classes which is evident in the logging details)

Help is much appreciated.

Thanks,
 
David Byron
Rancher
Posts: 175
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's hard to diagnose your problem with so few details.

Did you setVisible(true) on the MainWindow?
 
Dennis Grimbergen
Ranch Hand
Posts: 159
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James T John wrote:My issue is that the server starts fine, but the MainWindow doesn't open, and the ServerWindow just hangs there. Am I missing something?

When you start the application with the program argument 'server' your ServerWindow will be shown. What is your MainWindow? The client GUI? I don't understand why that window should appear when you start in server mode...

I guess something like this should happen:

Start application with argument 'server': -> Start the server and show the ServerWindow.
Start application without an argument: -> Start the network client, connecting to the server and spawn your MainWindow

 
Sean Keane
Ranch Hand
Posts: 588
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James. I too am working off the same book as you. The code for this book is freely available on the website for the book so I have posted up the code and the commands I used to run on it on this post here. Everything worked fine for me. Hope this helps.
 
James T John
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys, all the tips were helpful. Thanks Sean for posting the link to the commands, that's exactly the process I was looking for.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic