[prev in list] [next in list] [prev in thread] [next in thread]
List: zaurus-java
Subject: RE: [Zaurus-java] Closing the window
From: "Maxwell, Rhett" <Rhett.Maxwell () broadvision ! com>
Date: 2002-11-12 19:25:50
[Download RAW message or body]
Here's a snippet from one of my apps. I had to hide the window first.
public void windowClosing(java.awt.event.WindowEvent p1) {
p1.getWindow().hide();
System.exit(0);
}
-rhett
-----Original Message-----
From: Neil Moomey [mailto:neilm@denalifcu.com]
Sent: Tuesday, November 12, 2002 12:33 PM
To: 'zaurus-java@lists.sourceforge.net'
Subject: [Zaurus-java] Closing the window
How do you close a window on Zaurus? I wrote some code which closes fine on my PC \
but doesn't work on the Z. I have to exit the terminal to exit. Any ideas. Here is \
the main method. This is not the exact code but similar. - Neil
public static void main(String[] args) {
Frame frame = new Frame("ButtonDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
frame.getContentPane().add(new ButtonDemo(), BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Closing the window</TITLE>
<META content="MSHTML 5.50.4613.1700" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff size=2>Here's
a snippet from one of my apps. I had to hide the window
first.</FONT></SPAN></DIV>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff
size=2> public void windowClosing(java.awt.event.WindowEvent
p1) {<BR>
p1.getWindow().<STRONG>hide();</STRONG></FONT></SPAN><SPAN
class=155252219-12112002><FONT face=Arial color=#0000ff
size=2><BR>
System.exit(0);<BR> }</FONT></SPAN></DIV>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff
size=2>-rhett</FONT></SPAN></DIV>
<DIV><SPAN class=155252219-12112002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Neil Moomey
[mailto:neilm@denalifcu.com]<BR><B>Sent:</B> Tuesday, November 12, 2002 12:33
PM<BR><B>To:</B> 'zaurus-java@lists.sourceforge.net'<BR><B>Subject:</B>
[Zaurus-java] Closing the window<BR><BR></FONT></DIV>
<P><FONT size=2>How do you close a window on Zaurus? I wrote some code
which closes fine on my PC but doesn't work on the Z. I have to exit the
terminal to exit. Any ideas. Here is the main method. This is not
the exact code but similar. - Neil</FONT></P>
<P><FONT size=2> public static void main(String[] args)
{</FONT> <BR><FONT size=2> Frame
frame = new Frame("ButtonDemo");</FONT> </P>
<P><FONT size=2>
frame.addWindowListener(new WindowAdapter() {</FONT> <BR><FONT
size=2>
public void windowClosing(WindowEvent e) {</FONT> <BR><FONT
size=2>
System.exit(0);</FONT> <BR><FONT
size=2>
}</FONT> <BR><FONT size=2>
});</FONT> </P>
<P><FONT size=2>
frame.getContentPane().add(new ButtonDemo(), BorderLayout.CENTER);</FONT>
<BR><FONT size=2>
frame.pack();</FONT> <BR><FONT
size=2>
frame.setVisible(true);</FONT> <BR><FONT size=2> }</FONT>
</P></BLOCKQUOTE></BODY></HTML>
-------------------------------------------------------
This sf.net email is sponsored by:
To learn the basics of securing your web site with SSL,
click here to get a FREE TRIAL of a Thawte Server Certificate:
http://www.gothawte.com/rd522.html
_______________________________________________
Zaurus-java mailing list
Zaurus-java@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zaurus-java
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic