Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Java UI Help
Index -> Programming, Java -> Java Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chromium




PostPosted: Mon Jun 10, 2013 10:16 am   Post subject: Re: Java UI Help

Anyone know how?
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Mon Jun 10, 2013 11:49 am   Post subject: RE:Java UI Help

Each of your Frame instances is using the method defined in the Frame class (or whatever subclass defined it). In order to draw differently for a specific frame, you are going to need to subclass the Frame class and override the paint method.

Java:

Frame configFrame; // Regular
NargleFrame nargleFrame; // Custom frame

class NargleFrame extends Frame {
  @Override
  public void paint(Graphics g) {
    super.paint(g);
  }
}


Thing is, by overriding the paint method, you need to make sure to call super or the default behaviour (drawing all it's children probably) won't happen.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 17 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: