The Artima Developer Community
Sponsored Link

Java Buzz Forum
Thoughts about Swing

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bernard Choi

Posts: 74
Nickname: bchoi
Registered: Jun, 2003

Bernard Choi is online
Thoughts about Swing Posted: Jan 1, 2005 5:25 PM
Reply to this message Reply

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
Latest Java Buzz Posts
Latest Java Buzz Posts by Bernard Choi
Latest Posts From Bernard Choi

Advertisement
Confused while learning Swing ...

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...

Read: Thoughts about Swing

Topic: [Dec 20, 2004 06:48 PST] 9 Links Previous Topic   Next Topic Topic: A Good Use for UML

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use