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 / Virtual Machine / October 2003

Tip: Looking for answers? Try searching our database.

Implementing swing?

Thread view: 
Jeremy - 17 Oct 2003 07:53 GMT
Hello everyone,
There exists a JVM for my target operating system (Linux) However, I have
written a new windowing system and I would like to write AWT/Swing bindings
for it.  I have absolutely no idea how to even begin or how much work this
will be.  It seems like in a perfect world, all I would have to do is tell
Java how to create a window and give the device context to awt/swing, which
would do the rest.  I am sure that this is not the case :-)  Am I looking at
reimplementing every awt/swing component here?  Any reading materials to get
me started?  I didn't have the best of luck with Google.

Thanks,
-Jeremy
Chris Uppal - 17 Oct 2003 09:32 GMT
> [...], I have
> written a new windowing system and I would like to write AWT/Swing
> bindings for it.  I have absolutely no idea how to even begin or how much
> work this will be.

I don't know how much work it'd be, and it's not something I've ever tried.
However the place to start looking is the abstract class java.awt.Toolkit.  You
are expected to provide your own implementation of this (and whatever peer
classes you use).

On my (Sun JDK on Windows) system, there are two direct implementations of
Toolkit -- sun.awt.HeadlessToolkit  and sun.awt.SunToolkit (which is, in turn,
subclassed by sun.awt.windows.WToolkit).  These might be a good place to start
looking (if you have access to the source).

   -- chris
Chris Smith - 17 Oct 2003 14:36 GMT
> There exists a JVM for my target operating system (Linux) However, I have
> written a new windowing system and I would like to write AWT/Swing bindings
[quoted text clipped - 3 lines]
> would do the rest.  I am sure that this is not the case :-)  Am I looking at
> reimplementing every awt/swing component here?

Chris's reply gives you a general direction.  Just to answer this last
bit, you will need to reimplement the AWT components, but not the Swing
components.  If you want a native look and feel to make Swing look like
your own windowing system, though, you will need to implement look and
feel classes for the system.

Signature

www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



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.