Hi,
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?
TTFN
Paul
Paul writes:
Hi,
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.
Andrew.
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
Il giorno dom, 17/12/2006 alle 16.30 +0000, Paul ha scritto:
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.
What version of gcj are you running?
I've tried your examples and both seem fine:
[neugens@nirvana bin]$ java -version java version "1.4.2" gij (GNU libgcj) version 4.1.1 20061011 (Red Hat 4.1.1-30)
I've tried the snippets and both are fine.
As I say, all three could be down to me...
I remember that we had an issue about repainting, but now I really can't look at this, maybe in gcc/classpath bugzilla there is something, but at least with this simple case, it works for me (I know these are the scary words for bug reporters :).
Can you try to give us some more details (gcc version, ecj version, fedora/redhat version, processor type and other test case etc..)?
Mario
Hi,
What version of gcj are you running?
java version "1.4.2" gij (GNU libgcj) version 4.1.1 20061213 (Red Hat 4.1.1-47)
I'm on rawhide, x86_64
I've tried your examples and both seem fine:
Can you bung me over a screenshot or so (off list) to make sure they're doing the same as produced using Sun's Java?
As I say, all three could be down to me...
I remember that we had an issue about repainting, but now I really can't look at this, maybe in gcc/classpath bugzilla there is something, but at least with this simple case, it works for me (I know these are the scary words for bug reporters :).
/me runs away screaming!
Can you try to give us some more details (gcc version, ecj version, fedora/redhat version, processor type and other test case etc..)?
FC rawhide x86_64 ecj is not installed gcc 4.1.1 20061213 (Red Hat 4.1.1-47)
I realise that rawhide eats babies, but redraw and window closing should work as should the modal example.
TTFN
Paul
Il giorno dom, 17/12/2006 alle 17.43 +0000, Paul ha scritto:
Hi,
Can you bung me over a screenshot or so (off list) to make sure they're doing the same as produced using Sun's Java?
Sure, here they are!
http://www.limasoftware.net/neugens/downloads/classpath/test/
1, 2, 3 are from the first program, 1a, 2a from the second.
These are screenshots with gcj. Sorry they are full screen, I did not had time to cut and paste.
As I say, all three could be down to me...
I remember that we had an issue about repainting, but now I really can't look at this, maybe in gcc/classpath bugzilla there is something, but at least with this simple case, it works for me (I know these are the scary words for bug reporters :).
/me runs away screaming!
Can you try to give us some more details (gcc version, ecj version, fedora/redhat version, processor type and other test case etc..)?
FC rawhide x86_64 ecj is not installed gcc 4.1.1 20061213 (Red Hat 4.1.1-47)
I fear I cannot be of any help so, unless I manage to reproduce this bug.
You said you have submitted one in bugzilla. Can you point me to the issue number?
Mario
Hi,
Can you bung me over a screenshot or so (off list) to make sure they're doing the same as produced using Sun's Java?
Sure, here they are!
Yep, they look like what I'm getting here.
Can you try to give us some more details (gcc version, ecj version, fedora/redhat version, processor type and other test case etc..)?
FC rawhide x86_64 ecj is not installed gcc 4.1.1 20061213 (Red Hat 4.1.1-47)
I fear I cannot be of any help so, unless I manage to reproduce this bug.
I think it may be a rawhide bug more than anything. Things seem somewhat jiggered with Panels.
Am I correct in thinking the following
1. If I create a panel and set it BorderLayout.NORTH that unless I've put something in there before placing it, the panel should take the entire top?
2. If I create a JButton (called foo) then foo.setSize(30, 30) should create a button of size 30,30? If that is the case, then JButton is goosed as well.
You said you have submitted one in bugzilla. Can you point me to the issue number?
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219946
TTFN
Paul
Hi Paul,
On Sun, 2006-12-17 at 16:30 +0000, Paul wrote:
First is that the redraw events and quitting is bust. Assuming it's not just me being a numpty, the following shows the problem [...] 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.
This seems to work fine for me with gcj (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
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.
This also seems to work and just closes the window.
Next one is that modal windows don't seem to be sizing themselves correctly... [...] (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.
This also seems to work fine.
You say you have 4.1.1-47, I wonder what changed since -30. It looks like a regression. But classpath-cvs-trunk plus jamvm also work fine.
Cheers,
Mark
java-devel@lists.fedoraproject.org