• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Basic GUI principles

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I'm trying to understand some principles that come with basci GUI design. I have an applicatin designed and need to switch between windows, revert to windows that have already been opened, manipulated and closed, obtaining the previous contents, and stuff like that. Can someone please give me some insight into doing such. Do I have to implement threads?? Can anyone explain this concept?
Thanks...
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quite a complex question. I tend to make my dialog boxes Singleton objects so menu items or toolbar buttons or whatever wants to pop up the dialog.
 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Greg,

Thanks for the reply. I'm not familiar with Singleton objects. Can you explain further?
Thanks...
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The basic idea of the Singleton pattern is a class that allows only one instance of itself to exist.
Here's the basic framework I've used with regards to allowing only one of some frame to exist:


For more information on the Singleton pattern (or other patterns) a quick search on the JavaRanch forums will return some nice results as would a search on google.
Good Luck.
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is not an easy one to answer. There are multiple ways to do what you are asking. You could have a DB, pass object references or a few others. The answer actually depends on what you need to do. So unfortunately one answer doesn't exist.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding designing GUI applications, one guru I talked to a while back on this subject said that a course in multimedia design he'd taken at the university was very beneficial to his ability to design a GUI well.
I think this is a good question. Hopefully, someone will turn up with a great website or two on the subject.
Good Luck.
 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Thanks for the replies thus far. I really do appreciate all the assistance. I will investigate more on the Singleton class and if I do come up with a way to achieve what I want, I will post it up.
Thanks...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic