[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bug #13127] swing: menuitems rendered badly if window is to
From: |
anonymous |
Subject: |
[commit-cp] [bug #13127] swing: menuitems rendered badly if window is too small |
Date: |
Thu, 19 May 2005 21:09:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13127>
Summary: swing: menuitems rendered badly if window is too
small
Project: classpath
Submitted by: None
Submitted on: Thu 05/19/05 at 21:09
Category: classpath
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Platform Version: None
_______________________________________________________
Details:
Steps to reproduce:
1. Compile and run the attached testcase, I used classpath cvs 2005-05-19 and
1.3.0
2. A tiny window appears, open the menu by clicking "File".
Expected results:
"File" menu opens and all 10 menuitems are clearly visible.
Actual results:
"File" menu opens but menuitems are rendered badly. Items
are misaligned about 10 pixels to right. If I click "File" multiple times I
can see that each time some menuitems become invisible. After 14 clicks all
the menuitems are completely invisible.
This bug does not seem to occur if window dimensions are
set to (600, 600) instead of (300, 300).
Testcase:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.io.*;
import java.util.*;
public class MainWindow extends JFrame {
public static void main(String[] args) {
(new MainWindow()).show();
}
public MainWindow() {
this.setSize(new Dimension(300, 300));
this.createMenus();
}
private void createMenus() {
JMenuBar menuBar = new JMenuBar();
this.setJMenuBar(menuBar);
JMenu fileMenu = new JMenu("File");
menuBar.add(fileMenu);
for (int i=0; i<10; i++) {
String menutext = "";
for (int j=0; j<40; j++)
menutext += "" + i;
JMenuItem newMenuItem = new JMenuItem(menutext);
fileMenu.add(newMenuItem);
}
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13127>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [commit-cp] [bug #13127] swing: menuitems rendered badly if window is too small,
anonymous <=