Computer Science Canada Graphics in GUI? |
Author: | Ashi_Mashi2 [ Thu Dec 29, 2005 10:56 am ] |
Post subject: | Graphics in GUI? |
I want to make a Graphing calculator..so, I should somehow implement a Graphics object into GUI. Does anyone have any ideas? I researched a little, found a paintComponent method....dont know how it works or how to implement it...thanks a lot |
Author: | Ashi_Mashi2 [ Fri Dec 30, 2005 9:07 pm ] | ||
Post subject: | |||
ok..can someone plz tell me what's wrong with this code?..thx
|
Author: | rizzix [ Sat Dec 31, 2005 12:58 am ] |
Post subject: | |
extend java.awt.Canvas and ovrride paint(Graphics g) and not paintComponent(Graphics g) |
Author: | Ashi_Mashi2 [ Sat Dec 31, 2005 11:42 am ] | ||
Post subject: | |||
thanks...do you mean like this:
it still does not work ![]() |
Author: | rizzix [ Sat Dec 31, 2005 7:23 pm ] |
Post subject: | |
add the component to BorderLayout.CENTER Also, do not add unnecessary containers (in this case the extra JPanel). |