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 / November 2003

Tip: Looking for answers? Try searching our database.

GUI Problem

Thread view: 
Connell Gauld - 23 Nov 2003 16:31 GMT
My problem is fairly simple (I think):

Is there a component which I can put on a frame which is invisible but which
I can extend from a class for my own and use mouseExit and mouseEnter. I am
using java.awt.* (ie not javax.swing.*) for compatibility with another
system I am using?

Thanks for any help.

Connell
VK - 23 Nov 2003 17:06 GMT
Depends on what are you planning to place in this component.

If text only, then java.awt.Label will make the trick.

In more general case, extend java.awt.Canvas
Here you place everything you want, from pictures up to your own
interface elements.
Extra benefit is that Canvas has its own graphic context (Graphics), so
you can update it independently from the application's context.

NB: The AWT containers have no "transparency" property (at least nothing
that would work anyhow reliable). Just use the same background color for
the top and bottom layers.
Connell Gauld - 23 Nov 2003 20:56 GMT
Thanks for your help but this is not sufficient.
There is going to be nothing put onto the component, it is simply created to
respond to the mouse entering and leaving it (there might be a better way
to do this). A transparent component is required as there is a complicated
image below it.

Thanks
Connell

> My problem is fairly simple (I think):
>
[quoted text clipped - 6 lines]
>
> Connell
Ian Shef - 24 Nov 2003 18:51 GMT
> Thanks for your help but this is not sufficient.
> There is going to be nothing put onto the component, it is simply
[quoted text clipped - 15 lines]
>>
>> Connell

Possible solutions include:
java.awt.Component (an invisible AWT component that provides mouseEnter &
mouseExit; the simplest solution)

java.awt.Canvas (which you rejected for reasons I don't understand;
override paint and update if you don't want them to do anything)

java.awt.Panel

java.awt.Container

If none of these work for you, perhaps we need more information.

Good luck!

Signature

Ian Shef     805/F6      *    These are my personal opinions    
Raytheon Company         *    and not those of my employer.
PO Box 11337             *
Tucson, AZ 85734-1337    *



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.