• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Server GUI

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 580
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?).
 
Die Fledermaus does not fear such a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic