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 2005

Tip: Looking for answers? Try searching our database.

Swing wrapping

Thread view: 
Murray Buchanan - 09 Nov 2005 08:26 GMT
Hi there,

Just wondering if anyone has been involved in a project or development where
they wrapped the Swing API behind there own API.

Some Reasons Why:
To have our own events instead of Swing MouseEvents, KeyEvents coming
though to our application.
Also we want to have windows that close automatically on certain events
e.g. closes automatically on a Middle click.
Some key Events have to go to the main window which is a canvas even
though the focus is in another window.

Any information would be gratefully received.

cheers,

Muz
jonck@vanderkogel.net - 09 Nov 2005 14:02 GMT
> Just wondering if anyone has been involved in a project or development where
> they wrapped the Swing API behind there own API.

Well, not the entire API, but if you need a custom Swing component
you'll normally either extend the component in question or wrap it in
your custom class. I think every developer who has worked with GUI's
will have done this many times.

> Some Reasons Why:
> To have our own events instead of Swing MouseEvents, KeyEvents coming
> though to our application.
> Also we want to have windows that close automatically on certain events
> e.g. closes automatically on a Middle click.

Just implement the appropriate listeners.

> Some key Events have to go to the main window which is a canvas even
> though the focus is in another window.

Simply pass a reference of the canvas on to your other components, add
the appropriate listeners to these components, and send the events that
you capture on to your canvas.


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.