Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does one show a message in a popup-window from an applet?

applet message
0
Posted

How does one show a message in a popup-window from an applet?

0

Location: http://www.jguru.com/faq/view.jsp?EID=56939 Created: Jun 8, 2000 Modified: 2000-06-08 02:02:57.833 Author: Paolo Rocca (http://www.jguru.com/guru/viewbio.jsp?EID=56889) Question originally posed by Svend-Aage Nielsen (http://www.jguru.com/guru/viewbio.jsp?EID=53075 Just popup a Frame from your applet. This is your applet: //File hello.java import java.awt.*; import java.applet.*; public class hello extends Applet { Frame f = new helloFrame (); public void init() { setLayout (new FlowLayout()); add (new Button(“Click me”)); /* this button allows you to pop up a frame */ } public boolean action (Event evt, Object arg) { if (arg.equals(“Click me”)) { f.show(); // Show the popup window f.resize (150, 100); // and resize it return true; } else return false; } } And this is your frame: // File helloFrame.java import java.awt.*; import java.applet.*; public class helloFrame extends Frame { public helloFrame() { setLayout (new FlowLayout()); setTitle (“Hello!”); // The window title a

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123