Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT Java Dialogs
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


morris
Java Dialogs
2 Answer(s)      4 years and 9 months ago
Posted in : Swing AWT


a) I wish to design a frame whose layout mimics the Firefox print dialog . (please you can go to Mozilla Firefox, click File, then Print- to see the diagram)None of the components actually have to do anything. It should just show me how to lay out components.


b) I wish to write an applet with a 60 column by 10 row text area that allows the user to type some text. It should have a button that clears the text area when it's pressed.

Thanks in advance

Advertisement
View Answers

April 6, 2010 at 5:26 PM


Hi Friend,

Try the following code:

b)

1) TextWindow.java

import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

public class TextWindow extends Applet implements ActionListener {
TextArea area;
Button b;
Panel p;

public void init(){
area=new TextArea(10,60);
p=new Panel();
b = new Button("Reset");
b.addActionListener(this);
p.add(area);
p.add(b);
add(p);
}
public void actionPerformed(ActionEvent e){
area.setText(" ");
}
}

2)applet.html:

<html>
<body>
<h1>Java Applet Demo</h1>
<applet code=TextWindow.class width=500 height=400>
</applet>
</body>
</html>

Thanks


Related Tutorials/Questions & Answers:
Java Dialogs - Swing AWT
Java Dialogs  a) I wish to design a frame whose layout mimics...: Java Applet Demo Thanks  Hi Friend, a)Please visit the following links: http://www.roseindia.net/java/example/java/swing
java
java  Write a Java application that can capture five or more numbers and returns the total of the numbers, the average and the difference between total and average using input dialogs
Advertisements
Popup dialog box in java
Popup dialog box in java  How to display popup dialog box in java... on your application due to some event. With the help of java swing toolkit, you can create popup dialog box. Java swing toolkit provide tow types of dialog box
Message Box Java
Box"); } } } Resource: Java Message Box Show Dialog Box in Java - Swing Dialogs Show Message and Confirm Dialog Box...In this section we will create a message box in Java using a Java API class
Java Swing
Java Swing      ... Java programs with a graphical user interface (GUI). There are many components... in providing interactivity to Java applications. Following are components which
Java error dialog
Java error dialog       A Java dialog box is an independent sub window ... in understanding how to create an Error dialogs box using Swing JOptionPane.For
New Features of JAVA SE 6.
New Features of JAVA SE 6.   .... Changes in I/O This is a new feature added in Java SE 6, which has...; Java Web Start enhancements in version 6 The cache format of Java
java
java  diff bt core java and java
java
java  what is java
Java Web Start and Java Plug-in
Java Web Start Enhancements in version 6  ... Java Web Start should check for updates on the web, and what to do when.... Prior to Java SE 6, In Java Web Start <offline-allowed> element
Java
Java   Whether Java is pure object oriented Language
java
java  different between java & core java
java
java  explain technologies are used in java now days and structure java
java
java   why iterator in java if we for loop
JAVA
JAVA  how the name came for java language as "JAVA
java
java  what is java reflection
java
java  is java open source
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
java  write a java program using filenotfoundexception
Java
Java  how to draw class diagrams in java
java
java   difference between class and interface
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java  is java purely object oriented language
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  what are JAVA applications development tools
java
java  how use java method
java
java  send me java interview questions
java
java  write a program in java to acess the email
java
java  Write a java code to print "ABABBABCABABBA
Advertisements
 

 

 

DMCA.com