Results 1 to 1 of 1
Thread: The scale() method
- 07-15-2009, 04:49 PM #1Member
- Join Date
- Jul 2009
- Rep Power
The scale() method
If we override the paintComponet method of a JComponent, let's say a JButton, and we call the scale(double, double) method on the Graphics object where both of the parameters are lower than 1, the button will appear smaller on the GUI accordingly to the paramaters values. However, the area on the parent container that is allocated to the button to render itself in will remain the same, which makes the button take and react to input outside of it's box.
Does any one know how to fix this. thx
Last edited by IamKira; 07-15-2009 at 05:50 PM.
- By Java Tip in forum SWT TipsReplies: 0Last Post: 07-07-2008, 05:49 PM
- By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 09:53 PM
- By Panchitopro in forum AWT / SwingReplies: 4Last Post: 05-20-2008, 05:44 PM
- By Panchitopro in forum New To JavaReplies: 0Last Post: 05-05-2008, 06:22 PM
- By Greenfrog99 in forum AWT / SwingReplies: 0Last Post: 01-27-2008, 09:46 PM