2004-01-05 Fernando Nasser <fnasser@redhat.com>
+ * java/awt/Dialog.java (constructor): Accept null title as per spec.
+ * java/awt/FileDialog.java (constructor): Throw exception on invalid
+ argument as per spec.
+
+2004-01-05 Fernando Nasser <fnasser@redhat.com>
+
* java/awt/Choice.java (add): Leave posting of ItemEvents to peer.
(insert): Ditto.
(remove): Ditto. Also, Check for valid argument.
{
super (parent, gc);
- this.title = title;
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
this.modal = modal;
visible = false;
Dialog (Dialog parent, String title, boolean modal, GraphicsConfiguration gc)
{
super (parent, parent.getGraphicsConfiguration ());
-
- this.title = title;
+
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
this.modal = modal;
visible = false;
public synchronized void
setTitle(String title)
{
- this.title = title;
+ // A null title is equivalent to an empty title
+ this.title = (title != null) ? title : "";
+
if (peer != null)
{
DialogPeer d = (DialogPeer) peer;
FileDialog(Frame parent, String title, int mode)
{
super(parent, title, true);
+
+ if ((mode != LOAD) && (mode != SAVE))
+ throw new IllegalArgumentException (
+ "Mode argument must be either LOAD or SAVE");
+
setMode (mode);
}