[2634] in java-interest
jdk bugs?
daemon@ATHENA.MIT.EDU (Bindu Wavell (RUFUS))
Sun Oct 8 00:55:44 1995
To: java-interest@java.sun.com
Date: Sat, 07 Oct 1995 21:06:51 -0600
From: Bindu Wavell (RUFUS) <wavell@taussky.cs.colorado.edu>
Hiya, I have seen several discussions which appear to be point to these
problems with the jdk, but I want to make sure that what I'm doing is
causing a bug, and not an error in my understanding.
1) If I create a GridLayout and add a scrollbar and a button, either
nothing, or just the button show. If I reshape the button to anything
greater than or equal to (2, 2, 2, 2) it appears correctly. Resize
does not appear to work.
i.e.
<fixed> Pannel p = new Pannel;
p.add(new Scrollbar(Scrollbar.HORIZONTAL));
p.add(new Button("Quit"));
</fixed>
if I add p to my display frame the scrollbar does not display,
However:
<fixed> Pannel p = new Pannel;
Scrollbar sb = new Scrollbar(Scrollbar.HORIZONTAL);
p.add(sb);
p.add(new Button("Quit"));
sb.reshape(2,2,2,2);
</fixed>
appears to work correctly. Reshapeing to (1,1,1,1) does not work
and reshapeing to (2,2,2,0) (2,2,0,2) (2,0,2,2) or (0,2,2,2) does
not work either.
2) If I create a new button like this:
<fixed> void boolean dbgButton extends Button {
public dbgButton(String lbl) {
super(lbl);
}
public boolean MouseUp(Event e, int x, int y) {
System.out.println("(" + x + ", " + y + ")");
super.MouseUp(e, x, y);
}
}
</fixed>
an instance of dbgButton does not trigger the mouseUp event. If
I create a generic event handler, the only events that the buttons
seam to get are id=1001 and I don't know what that is yet. Should
the button get events for MouseUp, MouseDown, MouseEnter, etc.. ??
3) Finally this is not a bug, but has anyone had success building buttons
that have pictures rather than text by registering a peer display
function?
TIA, Bindu
P.S. I don't have the docs in front of me, so the case may be screwed up
on a few of the library routines (I hope not :)
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com