sophyan julio

Greenhorn
+ Follow
since Sep 16, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sophyan julio

Is it possible to change the color properties of the graphics object of one component in another component?
18 years ago
I extended a Jcomponent class for an applet so that I can make it a canvas to perform drawing on. The problem I'm having is when I do a repaint(); in the mousedragged handler, the applet draws extra components in the applet viewer. Is this an affect of thread safety? This problem is solved if I called paintComponent() instead of repaint(), but this method is not recommended in the java docs so I'm wondering what the real problem is.

18 years ago
I have a function that captues mouse input which then draws a size 20 pixel line. But using BasicStroke stroke = new BasicStroke(30,0,2); I get jagged lines within my drawn line, when I do a Drawline(). Is there a way to eliminate these artifacts?

I have already tried
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

but it does not improve the drawline function.

http://flickr.com/photos/fuoco/45073180

[ September 20, 2005: Message edited by: sophyan julio ]
18 years ago
thanks for your reply! i will use less of the VE feature in eclipse ;<
18 years ago
SUN used this snippet to show the corect way to create new UI Swing components. According to SUN this is so that the Milestone events like init, stop etc. will be placed on the event-dispatching thread used by the browser.



If I wanted to add a button, do I insert a new JButton in the createGUI function ?

Also I am developing in Eclipse, and when I create a new Japplet and added a new button component in Eclipse, the code generator does not adhere to the example above. Does this mean that the code generated in Eclipse is not kosher/threadsafe?

ie.


What are the 2 differences in both implementations, and which would you follow in your development?
[ September 16, 2005: Message edited by: sophyan julio ]
18 years ago