• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server GUI

 
Theo van Loon
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, i have a simple GUI for my server which displays just a single line and a button which enables the user to close the server.

GUI looks fine but ones i have dragged the gui i can't seem to click the button and it is below my button, and text seems to be displayed below the original text, so i have to click below the original button and there seems to be the button.

It seems like once i've dragged the GUI it repaints below the original fields and all goes wrong.

Very strange in order for you to be able to help i'll show a couple of snippets of my code :


Code in the Controller :


So that's all the code, the problem occurs when dragging the window to another position, so focus is lost. Same thing is happening to my proerties gui.

Can anybody help me out please?
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An old debugging trick will come in handy on this one. Reduce the problem to the simplest example that still shows the incorrect behaviour. At that point you should be able to figure it out.

One question I have is why are you extending JDialog? I'd have a class the "has" a JFrame, and use that to build the GUI.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Theo, not to be too picky, but I'd be careful of posting too much code. The Sun non-disclosure stuff is pretty tricky...personally, I think the server-side GUI should be as minimal as:

1. Getting/confirming the startup options.
2. Showing some startup status information in a "startup screen" type deal.
3. Giving the user the abilty to shut-down with one click (on a link on the
startup screen somewhere?).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic