Object « Component « Java Swing Q&A





1. Use same object on different components    coderanch.com

I have an instance of a label that displays the current system time. I want to pass this to 3 different components to display on all of them. However, it only shows the clock on the last component it is added to. I don't want to create 3 different instances of this clock, because then I would have to create 3 ...

2. should very swing components in respective object?    coderanch.com

hi, i read most of the Swing application have contains long code in a single class, which means if we create a menubar, i need a method which contains many lines in order to create further like add on menuitems and so on .. just wonder, should we put every components into respective class ? means menubar will have their own ...