Home Tutorialhelp Comment Use Simipler One

 
 

Comment

Ahmad Rajput
Use Simipler One,
June 22, 2009 at 12:56 PM

We can use a Simipler One

import java.awt.*;
import java.applet.*;

public class MyButton extends Applet{
public void init()
{

Button btnNorth=new Button("North");
Button btn South=new Button("South");
Button btnEast=new Button("East");
Button btnWest=new Button("West");
Button btnCenter=new Button("Center");

BorderLayout bl= (new BorderLayout());
setLayout(bl);

add(btnNorth, BorderLayout.NORTH);
add(btnSouth, BorderLayout.SOUTH);
add(btnEast, BorderLayout.EAST);
add(btnWest, BorderLayout.WEST);
add(btnCenter, BorderLayout.CENTER);

}
}



Thanks
Ahmad
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
General

BorderLayout Example In java
BorderLayout Example In java     ... BorderLayout in java awt package. The Border Layout is arranging and resizing... for using  this program. This Java Application uses BorderLayout for setting 

Java Interview Questions

java BorderLayout
java BorderLayout   How are the elements of a BorderLayout organized 

General

Java AWT Package Example
Java AWT Package Example       In this section you will learn about the AWT package of the Java... Example In Java In this section, you will learn how to create BorderLayout 

Java-Tutorials

Create a Container in Java awt
Create a Container in Java awt     ... application. All the controls used in your application are the container for one another...). BorderLayout : BorderLayout is the class of the java.awt.*; package which is used 

General

java awt package tutorial
Java AWT Package In Java, Abstract Window Toolkit(AWT) is a platform... every platform's native GUI toolkit. One of the AWT's significance... is used by each AWT component to display itself on the screen. For example 

Java Beginners

why and where we use setter and getter methods in java, please give me one example program.....
why and where we use setter and getter methods in java, please give me one example program.....  why and where we use setter and getter methods in java, please give me one example program 

Swing AWT

Java Dialogs - Swing AWT
/springlayout.html http://www.roseindia.net/java/example/java/awt/borderlayout-example... visit the following links: http://www.roseindia.net/java/example/java/swing...Java Dialogs  a) I wish to design a frame whose layout mimics 

Swing AWT

java - Swing AWT
java  how to use JTray in java give the answer with demonstration or example please 

Java Beginners

Java File Management Example
as text files. Yes you can use the Java API for reading the text file one line... of file. Read the example Read file in Java for more information on reading...Java File Management Example  Hi, Is there any ready made API 

Java Beginners

Java Comparable Example
Java Comparable Example  I want to know the use of Comparable Interface. Please provide me one example   Comparable interface is used.... Here is an example that compares two ages using Comparable Interface. import 

Java Beginners

Java Map Example
Java Map Example  How we can use Map in java collection?   ...), "Two"); mp.put(new Integer(1), "One"); mp.put(new Integer(3... :1 Value :One Key :2 Value :Two Key :3 Value :Three Key :4 Value :Four 

Swing AWT

awt - Swing AWT
market chart this code made using "AWT" . in this chart one textbox when user..., For solving the problem visit to : http://www.roseindia.net/java/example/java/awt/ Thanks 

Java Tips and Examples

Java AWT Package Example
 

Core Java

Threading In Java Example
Threading In Java Example In this section we will read about how to create a thread and use it in Java. There are the two mostly used methods for threading in Java. One is to create a subclass of Thread class and the another 

Java Beginners

why we use design patterns in java?Example?
why we use design patterns in java?Example?  Hi..... Why we use design patterns?,why they are needed in programming languages?,advantages?   hi friend, please go through the following links may this will be helpful 

Hibernate Tutorial Example

Hibernate Many-to-one Relationships
Relationships - Many to one relationships example using xml meta-data This current example demonstrates the use of Many  to one relationships. We will use... and between levels in a hierarchy. In this example multiple stories (Java 

General Information

What is AWT in java
What is AWT in java In this Example we will describe awt in java. The awt in java stands for Abstract Windowing Toolkit and is a package... In this example We have create frame in java AWT package. The frame in java works 

Programming Tutorials

ajax example
AJAX  What is AJAX?how we will use it in java?what is the use... ajax get example jQuery ajax get example  Hi, How I can use jQuery...Ajax Example Here is the list of few Ajax examples at RoseIndia.net. Ajax 

Swing AWT

AWT code for popUpmenu - Swing AWT
for more information. http://www.roseindia.net/java/example/java/awt/pop...AWT code for popUpmenu  Respected Sir/Madam, I am writing a program in JAVA/AWT.My requirement is, a Form consists of a "TextBox" and a "Button 

Core Java

Inheritance Example In Java
Inheritance Example In Java In this section we will read about the Inheritance... Here I am giving a simple example which will demonstrate you about how to use the inheritance feature in Java programming. This example will demonstrate you 

Java Interview Questions

Example for when to use ArrayList and when to use HashMap - Java Interview Questions
Example for when to use ArrayList and when to use HashMap  Hi Deepak u have replied this answer for when to use arraylist and hashmap " When your... example for this "once objects stored using arraylist ow to retrieve that using 

Blog

Java Args example
Debug with jdb Debug with jdb By: By Tony Sintes How do you use this crazy thing? How do you use jdb (included in the JDK 1.2 package) effectively to debug Java programs? I've tried many times, but I am successful only in loading 

Date Calendar

date and time in awt(java)
date and time in awt(java)  sir, do you have an example of date in awt java which can be view over a textfield.   Display time in JTextField import java.util.*; import javax.swing.*; import java.awt.event.*; public 

General

Java Set iterator with example
Java Set Interface keeps the data without duplicate value. Its one subtype Treeset always returns sorted data. But the subtype HashSet doesnot return sorted data. It uses iterator() method to traverse the data Example of Java 

Java Beginners

awt
Java AWT Applet example  how to display data using JDBC in awt/applet 

Swing AWT

Java - Swing AWT
Java    Hi friend,read for more information,http://www.roseindia.net/java/example/java/swing 

Swing AWT

java - Swing AWT
information, http://www.roseindia.net/java/example/java/awt/ Thanks...java  i want a program that accepts string from user in textfield1 and prints same string in textfield2 in awt   hi, import java.awt. 

Java Beginners

java string comparison example
java string comparison example  how to use equals method in String... strings are not same. Description:-Here is an example of comparing two strings using equals() method. In the above example, we have declared two string 

Java Beginners

throws example program java
throws example program java  how to use throws exception in java?   The throws keyword is used to indicate that the method raises..." java.lang.ArithmeticException: / by zero Description:- Here is an example of throws clause. We 

Java-Tutorials

Event handling in Java AWT
Event handling in Java AWT     ... events in java awt. Here, this is done through the java.awt.*; package of java. Events are the integral part of the java platform. You can see the concepts 

Swing AWT

Need Help with Java-SWING progrmming - Swing AWT
Need Help with Java-SWING progrmming  Hi sir, I am a beginner in java-swing programming. I want to know how we can use the print option...://www.roseindia.net/java/example/java/swing/Print.shtml Thanks 

Java Beginners

Java collection Stack example
Java collection Stack example  How to use Stack class in java... :- -1 Description:- The above example demonstrates you the Stack class in java.... Here is an example of Stack class. import java.util.Stack; public class 

Java Beginners

Inheritance java Example
Inheritance java Example  How can we use inheritance in java program... for bread Description:- The above example demonstrates you the concept... class by a sub class. With the use of extends keyword, the subclasses will be able 

Java Beginners

Java Queue Example
Java Queue Example  how to use queue in java ?   import...(); queue.add("Java"); queue.add("DotNet"); queue.offer("PHP...().queueExample(); } } Output:- remove: Java element: DotNet poll: DotNet peek 

Java Beginners

Java collection Queue Example
Java collection Queue Example  How can we use Queue in java... LinkedList(); queue.add("Java"); queue.add("DotNet...) { new MainDemo().queueExample(); } } Output:- remove: Java element 

Java Beginners

Synchronized with example - Java Beginners
Synchronized with example  Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thread tries to access a particular resource we can lock the method using synchronized keyword. Then after 

Swing AWT

provide code - Swing AWT
); } } ------------------------------------- visit for more information. http://www.roseindia.net/java/example... GAME.....using swings,awt concepts   Hi friend, import java.awt....(){ Dimension boardSize = new Dimension(600, 600); // Use 

Java Beginners

Java ArrayList Example
Java ArrayList Example  How can we use array list in java program ?   import java.util.ArrayList; public class ArrayListExample... demonstrates you the use of ArrayList. An ArrayList is a data structure. It can 

Swing AWT

java swings - Swing AWT
. http://www.roseindia.net/java/example/java/swing/draw-simple-bar...java swings  I am doing a project for my company. I need a to show... write the code for bar charts using java swings.  Hi friend, I am 

General

Java Array Iterator with Example
of the Iterator interface to manipulate more than one ArrayList Java Array Iterator with Example import java.util.*; public class arrayIterator... Java Array Iterator is an interface in the collection framework. Java 

Swing AWT

java - Swing AWT
Java Implementing Swing with Servlet  How can i implement the swing with servlet in Java? Can anyone give an Example??   Implementing Swing with Servlet Example and source Code Servlet SwingToServlet 

Java Beginners

Graphical calculator using AWT - Java Beginners
... But i got some errors while compiling some of them i made clear but still one error...); clearButton.addActionListener(new ClearListener()); //--- One listener for all...(); content.setLayout(new BorderLayout(5, 5)); content.add(m_displayField 

Java Beginners

array example - Java Beginners
a question about how many dependents 10. Use a loop to get the names and add... i cannot solve this example 

Ajax Questions

java persistence example
java persistence example  java persistence example 

Core Java

Java Stack Example
Java Stack Example In this section we will read about how you can provide... an example is being given which will demonstrate you about how to use the stack collection in the Java programming. In this example you will see how 

Swing AWT

use of plugins - Swing AWT
use of plugins  hi dear i m making a project on java swing .i needed a plugins for search buttons........  https://swingexplorer.dev.java.net/tips.html Thanks 

Swing AWT

AWT-swings tutorial - Swing AWT
://www.roseindia.net/java/example/java/swing/ http://www.roseindia.net/java/example/java...AWT-swings tutorial  hello sir, i am learnings swings and applets.. i want some tutorials and some examples related to swings.. thank you sir 

Swing AWT

java swing - Swing AWT
: http://www.roseindia.net/java/example/java/swing/ Thanks...java swing  how to add image in JPanel in Swing?  Hi Friend, Try the following code: import java.awt.*; import java.awt.image. 

Core Java

Java Wrapper Class Example
Java Wrapper Class Example In this section we will read about how to use... about how to use the wrapper classes in Java. In this example we will create a Java class where we will use the various methods of java.lang.Integer class 

Java-Tutorials

Java Thread getStackTrace Example
Java Thread getStackTrace Example This section explains use of getStackTrace() method  in java Thread. Thread getStackTrace() : It returns an array of StackTraceElement, and individual of them shows one stack frame. acts 

Java Beginners

awt in java
awt in java  using awt in java gui programming how to false the maximization property of a frame 

Java Interview Questions

awt - Java Interview Questions
awt  what is the difference between awt and swings  Hi friend, These are basically the main differences between awt and swing. 1.swing components sits on the top of AWT components and do the wiork. 2.AWT 

General

Clone method example in Java
Clone method example in Java       Clone method example in Java programming language Given example of java clone() method illustrates, how to use clone() method. The Cloneable 

Swing AWT

java - Swing AWT
java  how can i add items to combobox at runtime from jdbc   Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/AddRemoveItemFromCombo.shtml Thanks  Hi Friend 

Swing AWT

Java - Swing AWT
. http://www.roseindia.net/java/example/java/swing...("Paint example frame") ; getContentPane().add(new JPaintPanel 

Swing AWT

java-swings - Swing AWT
://www.roseindia.net/java/example/java/swing/ Thanks. Amardeep...java-swings  How to move JLabel using Mouse? Here the problem is i have a set of labels in a panel. I want to arrange them in a customized order 

General

Generics Example Program in Java
Generics Example Program in Java explaining how you use it effectively.... This tutorial also explains with the example code how to use the generics in classes... in Java code. Generic List Example In this example I will show you how you can 

Java Technology Tutorials

Java Example Codes and Tutorials
Java Tutorials - Java Example Codes and Tutorials Java is great programming...; Use of Java Java technology...; Java Break Example 

Java Interview Questions

Java AWT
Java AWT  What interface is extended by AWT event listeners 

Java-Tutorials

Java - Copying one file to another
Java - Copying one file to another       Introduction This example illustrates how to copy contents from one file to another file. This topic is related 

Swing AWT

query - Swing AWT
java swing awt thread query  Hi, I am just looking for a simple example of Java Swing 

Java Beginners

Java Client Application example
Java Client Application example  Java Client Application example 

JRuby

"TreeSet" example in JRuby
tutorials we have learned about how to use Java classes in JRuby program now here is one more example that uses Java class TreeSet.  In this example we have... "TreeSet" example in JRuby   

General

Java Get Example
is method and how to use the get method in Java, this example is going... will learn how to use the method getGraphics().   Java example program... Java Get Example       

General

Java Get Example
is method and how to use the get method in Java, this example is going... will learn how to use the method getGraphics().   Java example program... Java Get Example       

Java Tips and Examples

Array List Example in java
Array List Example in java       In this example we are going to show the use of java.util.ArrayList....;} } The output of program will be like this: C:\Java 

Blog

AWT basics
AWT documentation AWT example AWT manual AWT tutorial...AWT basics Are you looking for the AWT Basics to help you learn AWT quickly? Here we have provided you the links to our AWT tutorials. AWT stands 

Core Java

Example of HashSet class in java
Example of HashSet class in java. In this part of tutorial, we... unique. You can not store duplicate value. Java hashset example. How.... Example of Hashset iterator method in java. Example of Hashset size() method 

Core Java

Example of HashMap class in java
Example of HashMap class in java. The HashMap is a class in java collection framwork. It stores values in the form of key/value pair. It is not synchronized 

Java Tips and Examples

Link List Example in Java
Link List Example in Java       In this example, we are going to show the use of java.util.LinkedList.... In this example we are using six methods of LinkedList class. add(Object o): Appends 

Java Interview Questions

Java AWT
Java AWT  What is meant by controls and what are different types of controls in AWT 

Swing AWT

awt list item* - Swing AWT
information. http://www.roseindia.net/java/example/java/awt/ Thanks...awt list item*  how do i make an item inside my listitem...); choice.add("Java "); choice.add("Jsp"); choice.add("Servlets 

JDBC Questions

awt jdbc
awt jdbc  programm in java to accept the details of doctor (dno,dname,salary)user & insert it into the database(use prerparedstatement class&awt 

Java Beginners

Java FTP Client Example
Java FTP Client Example  How to write Java FTP Client Example code? Thanks   Hi, Here is the example code of simple FTP client in Java which downloads image from server FTP Download file example. Thanks 

Applet Questions

AWT Tutorials
AWT Tutorials  How can i create multiple labels using AWT????   Java Applet Example multiple labels 1)AppletExample.java: import javax.swing.*; import java.applet.*; import java.awt.*; import 

General

Java HashMap iterator and example
. So use the entrySet() method to get the data in Set object form. Set's all elements can be traversed by the Iterator. Example of Java HashMap... Java HashMap Iterator is an interface. It keeps the data in the key 

Java Beginners

Awt programming with java
Awt programming with java  Write a java program, which provides a text area with horizontal and vertical scrollbar.Type some lines in the text area and use scrollbars to move the text within the text area.Read a word in a text 

Core Java

Example of Hashset iterator method in java.
Example of Hashset iterator method in java. In this exmple of HashSet class,  you will see the use of iterator() method. It is used for traversing all element from HashSet. Code:  HashSetRemoveElement.java package 

General

Java Map iterator with example
use the entrySet() method to get the data in Set object form. Use the entrySet() method to get the data in Set object form. Java Map Iterator with Example... Java Map Iterator is an interface. It keeps the data in the key and value 

General

Java Collection iterator with example
. Example of Java Collection Iterator import java.util.ArrayList; import... The Java Collection Iterator is present at the highest level interface in the Collection framework. Iterator interface has methods for traversing 

Java Beginners

java program example - Java Beginners
java program example  can we create java program without static and main?can u plzz explain with an example 

Java Beginners

FTP Java example
FTP Java example  Where is the FTP Java example on your website? I am... examples of FTP at: FTP Programming in Java tutorials with example code. Thaks... functionality in my Java based application. My application is swing based and I have 

Java Beginners

Java FTP Example
Java FTP Example  Is there any java ftp example and tutorials... and tutorials that teaches you how to user FTP in your Java project. Most commonly used FTP api in java is Apache FTP. Browse all the FTP tutorials at Java FTP 

JDK 6 Tutorials

Java set example
Java set example In this section you will learn about set interface in java. In java set is a collection that cannot contain duplicate element. The set... collection. Example of java set interface. import java.util.Iterator; import 

Java Beginners

java-awt - Java Beginners
java-awt  how to include picture stored on my machine to a java frame... frnd.... "\" is a special character... i think u must use "\\" whereever u want... information, http://www.roseindia.net/java/ Thanks 

JSP Tutorials

Inheritance in java with example
Inheritance in java with example          Inheritance is one of the concept...;How to Use Inheritance in the jsp</title> </head> < 

General

SortedMap (interface) example in java Collection Framework
SortedMap (interface) example in java Collection Framework       In this example I will show you how you can use SortedMap interface in your Java application 

Java Beginners

freemarker example - Java Beginners
an example for freemarker. i want to get the values from java and display those values in the page designed using freemarker(how to get the values from java). and please provide an example with code and directory structure. send me ASAP 

Swing AWT

DrawingCircle - Swing AWT
: http://www.roseindia.net/java/example/java/swing/ Thanks... BorderLayout()); content.add(drawing, BorderLayout.CENTER 

General

Java bigdecimal shortValue example
Java bigdecimal shortValue example       In this example working of  Java bigdecimal class... data type value. In the example one bigdecimal object  mass is created.  

Java Beginners

Example Code - Java Beginners
Example Code  I want simple Scanner Class Example in Java and WrapperClass Example. What is the Purpose of Wrapper Class and Scanner Class . when i compile the Scanner Class Example the error occur : Can not Resolve symbol 

Swing AWT

SWINGS - Swing AWT
more information,Examples and Tutorials on Swing,AWT visit to : http://www.roseindia.net/java/example/java/awt/ http://www.roseindia.net/java/example/java 

Java Beginners

printing example - Java Beginners
printing example  Is it possible to print java controls using print method? My problem is to print a student mark list using java? The mark list should like that of university mark list 

Swing AWT

Java Program - Swing AWT
Java Program  A java Program that send message from one computer to another and what are the requirements 

Swing AWT

Java Program - Swing AWT
Java Program  A Java Program to send message from one computer to another 

Core Java

Java hashset example.
Java hashset example.     HashSet is a collection. You can not store duplicate value in HashSet. In this java hashset exmple, you will see how to create HashSet in java application and how to store value in Hashset 

General

Java example to calculate the execution time
Java example to calculate the execution time       get execution time This example program... of the program or method by the ending time of the method. In our example java 

Swing AWT

Design a Toll bar - Swing AWT
://www.roseindia.net/java/example/java/swing/CreateToolbar.shtml Thanks...Design a Toll bar  Hi,i am very new to Swings-awt..... Please any one send me the Logic to Create a Toolbar which is similar to --- winword 

General

Java bigdecimal toEngineeringString example
Java bigdecimal toEngineeringString example       In this example working of  Java... as string type value. In the example one bigdecimal object  neo is created 

Java Beginners

what is the example of wifi in java
what is the example of wifi in java  i want wi fi programs codings 

Advertisements Advertisements
 

 

 

DMCA.com