You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/11/17 06:51:39 UTC
[jira] Commented: (HARMONY-1801) [classlib][swing]
JComponent.setBounds() should not cause revalidation
[ http://issues.apache.org/jira/browse/HARMONY-1801?page=comments#action_12450636 ]
Mikhail Loenko commented on HARMONY-1801:
-----------------------------------------
when I apply regression test, it does not fail.
Was the problem fixed somehow?
> [classlib][swing] JComponent.setBounds() should not cause revalidation
> ----------------------------------------------------------------------
>
> Key: HARMONY-1801
> URL: http://issues.apache.org/jira/browse/HARMONY-1801
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Dmitry A. Durnev
> Assigned To: Mikhail Loenko
> Priority: Minor
> Attachments: H1801-BasicTabbedPaneUI.patch, H1801-fix.patch, H1801-tests.patch
>
>
> Validation process should not be initiated by component reshaping to avoid too
> many re-validations while doing layout (layout usually causes reshape).
> Therefore JComponent.setBounds() should not call revalidate.
> Compile & run the following test:
> import java.awt.EventQueue;
> import java.lang.reflect.InvocationTargetException;
> import javax.swing.JButton;
> import javax.swing.JFrame;
> public class SetBoundsTest {
>
> public static void main(String[] args) throws InterruptedException, InvocationTargetException {
> final JFrame jf = new JFrame("test");
> final JButton jb = new JButton("1");
> jf.getContentPane().add(jb);
> jf.setSize(200, 200);
> EventQueue.invokeAndWait(new Runnable(){
> public void run() {
> jf.show();
> }
>
> });
> EventQueue.invokeAndWait(new Runnable(){
> public void run() {
> jb.setSize(150, 500);
> }
>
> });
>
> EventQueue.invokeAndWait(new Runnable(){
> public void run() {
> System.out.println(jb.getSize());
> jf.dispose();
> }
>
> });
>
> }
> }
> On RI button size set by user(150, 500) is printed. On Harmony some other size (set by layout) is printed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira