The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Frame doudt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Frame doudt" Watch "Frame doudt" New topic
Author

Frame doudt

Suren Babu
Greenhorn

Joined: Oct 23, 2000
Posts: 27
Could somebody explain me why Bye is not displayed in window...
class Test {
Frame f;
public Test() {
f = new Frame();
f.setSize(400,400);
f.setVisible(true);
}
public void paint(Graphics g) {
g.drawString("Bye",10,30);
}
public static void main(String []a) {
new Test();
}
}
Suren Babu
Greenhorn

Joined: Oct 23, 2000
Posts: 27
Hi Gautam,
thanks for your response...
I already checked through subclassing, and it works.. but i am wondering why it is not working if you create a Frame instance inside the class...
Any help ..
 
IntelliJ Java IDE
 
subject: Frame doudt
 
developer file tools