Hi Andrew, > > I'm using gcj to compile some java and I'm not getting the results I'd > > expect out. Do I file this as usual in BZ or should I check here first > > if it's an oddity which doesn't need reporting? > > It depends on what it is. Talk to us, and probably file a bugzilla if > warranted. If it's an upstream bug, please make sure it gets file in > gcc Bugzilla, not Fedora Bugzilla. Thanks - I've got two - one is in BZ, one isn't. First is that the redraw events and quitting is bust. Assuming it's not just me being a numpty, the following shows the problem import java.awt.*; import javax.swing.*; public class gridlayout extends JFrame { private JButton [] buttons; public gridlayout(String title) { super(title); Container contentPane = this.getContentPane(); contentPane.setLayout(new GridLayout(2, 3, 10, 15)); buttons = new JButton[6]; for (int i = 0; i < buttons.length; ++i) { buttons[i] = new JButton("Click " + (i + 1)); contentPane.add(buttons[i]); } } public static void main(String [] args) { JFrame f = new gridlayout("Grid Layout Demo"); f.setSize(300, 200); f.setVisible(true); } } Really simple code - it does as it's told and runs. However, move another window over it and the redraw does nothing when the 2nd window is removed to show the java app window. The second is that if I click on the close window icon, it doesn't - instead I get the error box asking if you want to wait or terminate straight away. Next one is that modal windows don't seem to be sizing themselves correctly... import java.awt.*; import java.awt.event.*; import javax.swing.*; public class modaltest extends Frame implements ActionListener { private Dialog modal; private JButton go, ok; public modaltest(String title) { super(title); go = new JButton("Go"); go.addActionListener(this); ok = new JButton("OK"); ok.addActionListener(this); modal = new Dialog(this, "A modal dialog", true); modal.setLayout(new FlowLayout()); modal.add(ok); modal.setBounds(60, 100, 180, 60); JPanel centre = new JPanel(); centre.add(go); this.add(centre, BorderLayout.CENTER); } // clicking either button cause the following method to hit in public void actionPerformed(ActionEvent e) { String label = e.getActionCommand(); if(label.equals("Go")) modal.show(); else if (label.equals("OK")) modal.hide(); } public static void main(String [] args) { Frame f = new modaltest("Modal test"); f.setSize(300, 300); f.setVisible(true); } } (yes, I know, hide() and show() are deprecated, but that shouldn't make much of a difference here). Here, if GO is clicked, the modal window is opened. However, the OK button isn't in there as it looks as if either a redraw has failed or the window is too small for the button to appear in. As I say, all three could be down to me... Any advice would be appreciated. TTFN Paul -- "Mmmmmmmm....Shakira geschmiert mit schokolade" sagt Homer
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-devel-java-list mailing list fedora-devel-java-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-java-list