• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

from ServerWindow to MainWindow

 
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,
 
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?
 
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

 
Ranch Hand
Posts: 590
Eclipse IDE Chrome 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.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic