Graphics, AWT, Swing I part
Answer: You use the unicode string \u???? corresponding to your character.
A table of codes can be found at 
www.unicode.org/charts/
by Charles Megnin
Is there any way to accept password from a java application. As it is a password,
IT SHOULD NOT BE SHOWN(ECHOED) WHILE IT IS ENTERED.
Answer: If you are using swing, you can use JPasswordField, and set your
echo character.
by myparu
How can I change the default icon on application window (java cup) to my own?
Answer:
window.setIconImage(Toolkit.getDefaultToolkit().getImage("image.gif"));
 Q: How can I read a Tab delimited text file into a JList?
All I need is the first item in each record. I import each line with a
BufferedReader.Readline() and then look at each char with record.substring(n,n+1).
How can I check if the next char is a Tab?
Answer: StringTokenizer st = new StringTokenizer(record, "\t");
while (st.hasMoreTokens()) {
     String token = st.nextToken();
    // ... do something with the token
}
How do I generate mouse click event but without a real click?
Could you tell me how I can generate an event (like a mouse click) from a Java
application? (I want generate a mouse click event but without a real click on the
mouse).
Answer: See "simulate keyboard pressing" below: You can use java.awt.Robot"
since java1.3
Q: Why would anyone use AWT and not Swing today?
Answer: There are several handheld devices that do not have a lot of memory or
CPU power available, AWT is more suitable for them (Smaller footprint).
 Q: Need I to remove all the listeners on all of the components in the Frame when
I close window of the Frame?
I ve got a Frame, which has in it a bunch of components, some of which themselves
may be containers. Many of the components in this frame have listeners.
When somebody closes the window of the Frame, I want to completely get rid of the
Frame, so that the garbage collector will later clean it up, freeing it s memory.
However, I haven t yet figured out a way to do this without tracking every single
component by myself. Just calling dispose() on the main Frame doesn t seem to be
good enough. Calling  "RemoveAll()", even recursively, doesn t seem to be good
enough.
I *suspect* that the problem may be that I have to remove all the listeners on all of
file:///F|/a_jsite/350_tips/graphics I.htm (4 of 5) [2001 07 08 11:24:55]






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java web hosting

 

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved