[Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #4 from abalkiss at redhat dot com  2005-10-26 15:23 ---
This appears to be a problem with JScrollPane.getPreferredSize(), as the
FlowLayout sets the size of the JScrollPane to its preferredSize, and then this
is a bound for the layout in ScrollPaneLayout which then sets an inappropriate
size for the JViewport.

The simple testcase below shows that JScrollPane is returning an inappropriate
value for getPreferredSize.


***TESTCASE***
import java.awt.*;
import javax.swing.*;

class Test2
{
  public static void main(String[] args)
  {
JFrame f = new JFrame();
String[] items = 
 {
   Item1, Item2, Item3, Item4, Item5, Item6,
   Item7, Item8, Item9, Item10, Item11
 };

JList list = new JList(items);
list.setPreferredSize(new Dimension(150, 150));
f.setLayout(new FlowLayout());
JScrollPane scroller = new JScrollPane(list);
System.out.println (scroll pane pref size: +scroller.getPreferredSize());
  }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360



[Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #5 from abalkiss at redhat dot com  2005-10-26 17:00 ---
An even more specific test case shows that the problem is in ScrollPaneLayout's
preferredLayoutSize method.


***TESTCASE***
import java.awt.*;
import javax.swing.*;

class Test
{
  public static void main(String[] args)
  {
String[] items = 
  {
Item1, Item2, Item3, Item4, Item5, Item6,
Item7, Item8, Item9, Item10, Item11
  };
JList list = new JList(items);
list.setPreferredSize(new Dimension(150, 150));
JScrollPane scroller = new JScrollPane(list);
System.out.println (scroller.getLayout().preferredLayoutSize(scroller));
  }
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360



[Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #6 from abalkiss at redhat dot com  2005-10-26 19:15 ---
Created an attachment (id=10064)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10064action=view)
patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360



[Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #7 from abalkiss at redhat dot com  2005-10-26 19:15 ---
Fixed, patch attached.


-- 

abalkiss at redhat dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |0.19


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360



[Bug swing/17362] Scrollbars in JScrollPane appear only if the Container containing JScrollPane is revalidated

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #4 from abalkiss at redhat dot com  2005-10-26 19:16 ---
This has gone backwards and is no longer fixed.


-- 

abalkiss at redhat dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17362



[Bug swing/17362] Scrollbars in JScrollPane appear only if the Container containing JScrollPane is revalidated

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #5 from abalkiss at redhat dot com  2005-10-26 19:59 ---
Created an attachment (id=10065)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10065action=view)
patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17362



[Bug swing/17362] Scrollbars in JScrollPane appear only if the Container containing JScrollPane is revalidated

2005-10-26 Thread abalkiss at redhat dot com


--- Comment #6 from abalkiss at redhat dot com  2005-10-26 20:00 ---
Fixed.


-- 

abalkiss at redhat dot com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17362



[Bug swing/17362] Scrollbars in JScrollPane appear only if the Container containing JScrollPane is revalidated

2005-09-27 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-27 15:15 
---
This has been fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17362


[Bug swing/16540] GlassPane intercepting of MouseEvents flaky.

2005-09-08 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-08 18:19 
---
This has been fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16540


[Bug swing/19845] Swing ToolTipManager and getLocationOnScreen

2005-09-08 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-08 18:51 
---
*** Bug 22830 has been marked as a duplicate of this bug. ***

-- 
   What|Removed |Added

 CC||from-classpath at savannah
   ||dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19845


[Bug swing/16540] GlassPane intercepting of MouseEvents flaky.

2005-09-06 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-06 20:52 
---
The proposed patch is incorrect, changes should instead be made in JComponent.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16540


[Bug swing/16540] GlassPane intercepting of MouseEvents flaky.

2005-09-02 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-02 19:45 
---
This bug appears to stem from the implementation method
Container$LightweightDispatcher.acquireComponentForMouseEvent method.  This is
an undocumented implementation method so it will take me a while to fix it while
making sure I don't break something else.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16540


[Bug swing/22151] JInternalFrame causes OutOfMemory error when maximized.

2005-09-01 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-09-01 18:27 
---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22151


[Bug swing/21444] Swing JList can't do multiple selection

2005-08-17 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-08-17 18:03 
---
bug fixed, closed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21444


[Bug SWING/22151] JInternalFrame causes OutOfMemory error when maximized.

2005-06-23 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-23 17:20 
---
1: removing the call to handleEvent() in
BasicInternalFrameUI$GlassPaneDispatcher.mouseExited fixes the problem, but does
it break something else?

2: after maximizing, you have to move the mouse to trigger the infinite loop.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22151


[Bug SWING/22151] JInternalFrame causes OutOfMemory error when maximized.

2005-06-23 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-23 18:20 
---
Created an attachment (id=9135)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9135action=view)
proposed patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22151


[Bug SWING/22151] JInternalFrame causes OutOfMemory error when maximized.

2005-06-23 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-23 18:21 
---
Patch proposed, should be patched in classpath very shortly.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed||1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22151


[Bug SWING/21444] Swing JList can't do multiple selection

2005-06-23 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-23 18:23 
---
I patched this in classpath, merge should fix it.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21444


[Bug SWING/19860] Swing JOptionPane and multiline texts

2005-06-23 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-23 18:23 
---
I patched this in classpath, merge should fix it.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19860


[Bug SWING/22151] New: JInternalFrame causes OutOfMemory error when maximized.

2005-06-22 Thread abalkiss at redhat dot com
JInternalFrame causes OutOfMemory error when maximized.

Run the test case below, maximize the JInternalFrame, wait a while.  OutOfMemory
error.  

When the JInternalFrame is positioned at (10,10) rather than (60,60) the error
doesn't occur.

==TEST CASE==
import java.awt.*;
import javax.swing.*;
import java.io.*;

public class OutOfMemory {
   public static void main(String[] a) throws IOException{
  JFrame myFrame = new JFrame(Outer);
  myFrame.setSize(300,300);
  myFrame.setContentPane(new JDesktopPane());
  JInternalFrame f = new JInternalFrame(Internal);
  f.setSize(200,200);
  f.setVisible(true);
  f.setClosable(true);
  f.setMaximizable(true);
  f.setResizable(true);
  f.setIconifiable(true);
  /* IF THE FOLLOWING LINE IS CHANGED TO f.setLocation (10,10)
 no OutOfMemory error occurs! */
  f.setLocation(60,50);
  myFrame.add(f);
  myFrame.setVisible(true);
   }
}

-- 
   Summary: JInternalFrame causes OutOfMemory error when maximized.
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: SWING
AssignedTo: abalkiss at redhat dot com
ReportedBy: abalkiss at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22151


[Bug SWING/17360] JScrollPane has incorrect size when JList with specified size is added to it

2005-06-20 Thread abalkiss at redhat dot com

--- Additional Comments From abalkiss at redhat dot com  2005-06-20 19:18 
---
Problem may be with layout managers instead of JScrollPane.  Run the test case
from Additional Comment #1 and try changing the JFrame's layout manager to
BoxLayout or GridLayout.  The problem no longer surfaces.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360