FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Integration
(Moderators: fry, REAS)
   Swing Components
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Swing Components  (Read 3471 times)
zatrix


Swing Components
« on: Feb 20th, 2005, 1:54am »

Sorry not sure if I'm in the right catergory.
 
Anyway, this Processing thing is wicked, I glad to see it's not limited and I am still able to take advantage of usual java code.
 
However, when using a Swing component instead of a AWT component (Button : Awt , JButton : Swing), the swing version of each component acts funny. They dont show up properly. For example if you create a new button,
 
Code:
add(new Button("test"));

that will create a simple button no problem. However change the code to,
 
Code:
add(new javax.swing.JButton("test"));

 
now that button will appear in the same place as the previous button but it wont be visible until you click on it.
 
I think it has something to do with the way the screen is redrawn.
 
Anyone else encounter this? Any ideas how to fix it?
 
fjen

WWW
Re: Swing Components
« Reply #1 on: Feb 21st, 2005, 1:04pm »

there has been discussions about similar things before:
 
The java button question (again)
TextField and TextArea
 
Sun: Mixing heavy and light components
 
processing was not ment to be used like that, so best is to create your own components (see GUI examples here) or, if you insist on awt/swing, move the components into a new window.
 
/F
 
Pages: 1 

« Previous topic | Next topic »