This post originated from an RSS feed registered with Java Buzz
by Bernard Choi.
Original Post: Thoughts about Swing
Feed Title: Bernard Choi
Feed URL: http://bchoi.livejournal.com/data/rss
Feed Description: Bernard Choi - LiveJournal.com
1) from the examples, why the need to always cast Graphics to Graphcis2D in Component.paint() ? Why not just pass Graphics2D as the parameter in the first place ?
2) confusion between JComponent.paint(), JComponent.paintComponent(), JComponent.update(). When to call which, and why ?
public void update(Graphics g) { paint(g); }
, which makes me more confused.
3) Found the following in Java (1.)5.0, javax.swing.JComponent, line 1011
if (!printing) { paintChildren(co); } else { printChildren(co); }
Duh...
First impressions, SWT just feels better thought out...