Click here to Skip to main content
15,924,196 members
Home / Discussions / Java
   

Java

 
AnswerRe: Which is the best editor to use with Java??? Pin
zealot20621-Sep-11 15:33
zealot20621-Sep-11 15:33 
AnswerRe: Which is the best editor to use with Java??? Pin
uspatel22-Sep-11 2:03
professionaluspatel22-Sep-11 2:03 
QuestionJAVA : need to learn it ASAP Pin
robin7004-Sep-11 21:25
robin7004-Sep-11 21:25 
AnswerRe: JAVA : need to learn it ASAP Pin
Nagy Vilmos4-Sep-11 22:50
professionalNagy Vilmos4-Sep-11 22:50 
GeneralRe: JAVA : need to learn it ASAP Pin
robin7005-Sep-11 15:58
robin7005-Sep-11 15:58 
GeneralRe: JAVA : need to learn it ASAP Pin
Nagy Vilmos5-Sep-11 21:51
professionalNagy Vilmos5-Sep-11 21:51 
QuestionLOVE Pin
NADEEM CHHIMPA3-Sep-11 21:17
NADEEM CHHIMPA3-Sep-11 21:17 
QuestionRepaint JPanel problem in java Pin
flashery2-Sep-11 5:26
flashery2-Sep-11 5:26 
Hi to all I have a problem in repainting my JPanel. I am creating a ShapeApplication program that can draw a shape on a click of a button. I have different classes in my application.

JPanel1 extends JPanel = use to draw different shape

JPanel2 extends JPanel= use to put my components such as buttons, label, and etc..

JFrame extends JFrame= use to put my JPanel1 and JPanel2

I have also normal classes which I implemented on my own

Shape = my Parent Class

Rectangle extends Shape = subclass of Shape and having an attribute of a Rectangle shape such as height and width

Square extend Shape = subclass of Shape and having an attribute of a Square shape such as height and width


My problem now is that when I use a repaint in actionPerformed method under my JPanel2 which contain my button component there is no effect on my drawing class which is my JPanel1 class

I implemented it this way

JPanel1.repaint();

I initialize my button's ActionListener like this..

button.addActionListener(this);//I am confuse what would be in the parameter.

Can you give a hint on this one? Where do I get wrong?
AnswerRe: Repaint JPanel problem in java Pin
twseitex2-Sep-11 10:58
twseitex2-Sep-11 10:58 
QuestionRe: Repaint JPanel problem in java Pin
flashery2-Sep-11 19:21
flashery2-Sep-11 19:21 
GeneralRe: Repaint JPanel problem in java Pin
flashery3-Sep-11 6:55
flashery3-Sep-11 6:55 
GeneralRe: Repaint JPanel problem in java Pin
twseitex4-Sep-11 9:36
twseitex4-Sep-11 9:36 
QuestionWhat is tracking multiple instances? Pin
flashery1-Sep-11 19:41
flashery1-Sep-11 19:41 
AnswerRe: What is tracking multiple instances? Pin
David Skelly1-Sep-11 22:09
David Skelly1-Sep-11 22:09 
AnswerRe: What is tracking multiple instances? Pin
twseitex2-Sep-11 11:04
twseitex2-Sep-11 11:04 
Questionusing a private variable for the lock of synchronized block Pin
quartaela31-Aug-11 3:53
quartaela31-Aug-11 3:53 
AnswerRe: using a private variable for the lock of synchronized block Pin
Nagy Vilmos31-Aug-11 4:07
professionalNagy Vilmos31-Aug-11 4:07 
AnswerRe: using a private variable for the lock of synchronized block Pin
gospidey2-Sep-11 23:58
gospidey2-Sep-11 23:58 
QuestionjTable Pin
Shaahinm30-Aug-11 1:40
Shaahinm30-Aug-11 1:40 
QuestionHow to know user still connect to my website in local network ? Pin
tannghia28-Aug-11 17:28
tannghia28-Aug-11 17:28 
AnswerRe: How to know user still connect to my website in local network ? Pin
jschell29-Aug-11 9:10
jschell29-Aug-11 9:10 
Questioni got java.lang.NullPointerException error while delteing and adding new data inms access DB-pls guide me to solve Pin
jpljayapal27-Aug-11 8:42
jpljayapal27-Aug-11 8:42 
AnswerRe: i got java.lang.NullPointerException error while delteing and adding new data inms access DB-pls guide me to solve Pin
jschell28-Aug-11 8:08
jschell28-Aug-11 8:08 
QuestionComputer talks to u Pin
Had12327-Aug-11 5:48
Had12327-Aug-11 5:48 
AnswerRe: Computer talks to u Pin
Smithers-Jones27-Aug-11 23:48
Smithers-Jones27-Aug-11 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.