java swing engine

J

John B. Matthews

A

Arne Vajhøj

I want to know how the swing eninge draw each component on the
screen, what classes I have to look at?

SUN Java ships with source code for stuff written in Java. That
should be sufficient to understand Swing.

If you need to dig into the native part, then go to OpenJDK
and look at the source there.

Arne
 
P

peter

SUN Java ships with source code for stuff written in Java. That
should be sufficient to understand Swing.

If you need to dig into the native part, then go to OpenJDK
and look at the source there.

Arne

Thanks everyone first, that mean If I want to override the original
swing-drawing-engine, I need to write all the stub in C++. So far I
know, the AWT engine's paint() method call C function to paint
everything.
thanks
from Peter ([email protected])
 
L

Lew

peter said:
Thanks everyone first, that mean If I want to override the original
swing-drawing-engine, I need to write all the stub in C++. So far I

No, you could use C or assembler.
know, the AWT engine's paint() method call C function to paint
everything.

Are you writing your own JVM?
 
A

Arne Vajhøj

Thanks everyone first, that mean If I want to override the original
swing-drawing-engine, I need to write all the stub in C++. So far I
know, the AWT engine's paint() method call C function to paint
everything.

I think the short version of Swing is that:
- Java Swing code translates from text, lines etc. to pixels
- native AWT code renders the pixels

So if you for some reason want to write some code that
renders the pixels differently then you need to write C
code.

But if you want to change the way things look, then you
can change in the Java code.

Note that Swing comes with a pluggable Look & Feel model
that allows you to change things in a very nice way without
cloning standard Swing code.

Arne
 
P

peter

I think the short version of Swing is that:
- Java Swing code translates from text, lines etc. to pixels
- native AWT code renders the pixels

So if you for some reason want to write some code that
renders the pixels differently then you need to write C
code.

But if you want to change the way things look, then you
can change in the Java code.

Note that Swing comes with a pluggable Look & Feel model
that allows you to change things in a very nice way without
cloning standard Swing code.

Arne

I have written my L&F. I am think to write a 3D L&F
thanks
 
R

Roedy Green

I want to know how the swing eninge draw each component on the
screen, what classes I have to look at?

Start at http://mindprod.com/jgloss/swing.html

First learn how the various components work at the API level.

Then view the source code for each component, and work your way back
the inheritance tree.
--
Roedy Green Canadian Mind Products
http://mindprod.com

There is no harm in being sometimes wrong especially if one is promptly found out.
~ John Maynard Keynes (born: 1883-06-05 died: 1946-04-21 at age: 62)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top