This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi, I am learning Swing and was really stuck wit this I have a JMenu Class named "Vertical Menu" which I have customised. I have over ridden the setFont() method and it is working fine. I wanted to override the setPreferredSize() method too, but size was not reflecting. So I placed it in the "Vertical Menu"'s constructor. And it worked.
The question is: why did setPreferredSize() method work after placing it in the constructor?? if so then, how does the overridden method work.
P.S : setFont() was invoked on the VerticalMenu Object i.e i did not do VerticalMenu menu = new VerticalMenu(); menu.setFont();
If you ask me anything I don't know, I'm not going to answer.<br />--Yogi Berra