Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

Creating a HUD in Java

Thread view: 
Joseph Sheppard - 06 Jan 2004 17:54 GMT
Hi all...

I'm developing a java application based on the old Supremacy board game...

The display is a large map of the board, which is zoomable and scrollable.

I'd like to place several components on top of this, such as an 'Empire
Earth'-esque mini-map.

I don't want to use internal frames, because I don't want/need any framing
or menu bars.

I'd also like to abstract this out into other opaque overlays to be used as
panels for other game data, such as the other Players, etc.

Please throw some suggestions out to me as to how I should proceed.  Should
I be designing a custom component?

Thanks in Advance,

Joseph
Jeremy - 06 Jan 2004 21:07 GMT
If your application is inside a JFrame, you can draw onto the GlassPane.
Look up GlassPane in the API docs.  You'll have to make a subclass of
GlassPane (I think) which has its own paintComponent method that draws the
HUD stuff.  Then call myFrame.setGlassPane(mySubclassesGlassPane);  - I
think this will be the easiest and most sensical way to do this.

-Jeremy

> Hi all...
>
[quoted text clipped - 17 lines]
>
> Joseph


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.