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



Home Answers Viewqa Java-Beginners examples to draw Square in applet
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rajan Thapa
examples to draw Square in applet
0 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


  1. Write a Java Program with file name SectionB.java using Switch control Statement

The program will use the JOptionPane and ask the user to enter any number between 1 to 12.

Based on the input, then the program will show how many days in that month. For example if the user enters 1, the program will show ‚??The Month you entered is January and it has 31 days‚??. The output will be shown in the JOptionpane.

  1. Now modify the program; if the user enters ‚??2‚?? the program will ask the user if it is a leap year. If the answer from the user is ‚??Yes‚?? it will show the message ‚??February has 29 days‚??, if the response from the user is ‚??No‚?? it will show ‚??February has 28 days‚??. Again, the output should be shown in JOptionPane.

NOTE:

[In this program use try and catch block to handle any unacceptable and invalid input from the user]


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Write a Java applet to draw cylinder and pentagon shapes.
Write a Java applet to draw cylinder and pentagon shapes.  Write a Java applet to draw cylinder and pentagon shapes
how to draw network(lines and nodes) in java - Applet
how to draw network(lines and nodes) in java  Hi, Iam doing my MSC project. I want to know, how can we draw a network(with lines and nodes, any number of lines and nodes... say 5). I also want to know how can we draw a graph
Advertisements
how can i draw a table using applet or swings - Java Beginners
how can i draw a table using applet or swings  Hi RoseIndia, Actually, I was trying for creating a table using applet or swings.......... My task... to enter integer values..........but the examples i have gone through are accepting
how to drag top most images which is draw on applet.
how to drag top most images which is draw on applet.  Please help me, I have draw 83 images one by one from g.drawImages(,,,,); now I want to drag last image from 83 images and drop it suitable place, Now please help me , how can
Q6 Write a java applet that displays 9 squares, one below the other. Every third square must be filled in black?
Q6 Write a java applet that displays 9 squares, one below the other. Every third square must be filled in black?  Q6 Write a java applet that displays 9 squares, one below the other. Every third square must be filled in black
Applet
Applet  Draw the class hierarchy of an Applet class. Also explain how to set background and forground colors in java
Square Root
Square Root  Hi, can any one please tell me the code to findout the square root of a given number with using built in function??? Thanks a lot in advance!! Regards: Akash
examples
examples  Hi sir...... please send me the some of the examples... questions .   Hello Friend, Which type of connectivity examples do you want?Please clarify this. Thanks   mysql connectivity examples  
Applet
Applet  Write an applet to display a string in an applet. String should be passed as a parameter to an applet
Applet
Applet  Give the class hierarchy of an Applet class
applet
applet  Explain different stages in the lifecycle of an applet with figure.   Stages of Applet: Life cycle of an Applet: init(): This method is called to initialized an applet start(): This method is called after
Applet
Applet  how to run an applet on a web browser
applet
applet  What is the immediate superclass of the Applet class
Applet
Applet  Write a ava applet that sets blue color foreground and yellow color background at the start of an applet
java - Applet
java  1.An applet program to draw a line graph for y=2x+5.[for suitable values of x & y] 2. An applet program to draw following shapes (1)cone, (2)cube, (3)square inside a circle  Hi friend, this is cubic code
Applet
Applet  Explain the start() and stop() methods of applet life cycle.   Start and Start method of Applet Life Cycle Start () method: The start method of an applet is called after the initialization method init
Applet
Applet  I have a java applet that has a button. On clicking the button it should disappear and another applet should appear. How to write this code???? Also in login applet after successful login it should display admin applet
Applet
Applet  Write a short note on applet life cycle
applet - Applet
applet   how to draw textboxes using applets  Hi Friend...*; import java.awt.*; public class CreateTextBox extends Applet implements.../applet/ Thanks
applet
applet  what is applet in java   An applet is a small program that can be sent along with a Web page to a user. Java applets can perform... the following link: Applet Tutorials
applet program code - Applet
applet program code  hello sir, i did't get the code for below problem... please help me... 1.An applet program to draw a line graph for y=2x+5.[for suitable values of x & y
Applet
Applet  Write a Java applet that drwas a line between 2 points. The co-ordinates of 2 points should be passed as parametrs from html file. The color of the line should be red
applet
applet  applet to open new tab not working.here's my code import java.applet.*; import java.awt.*; import java.net.*; import java.awt.event.*; public class NewURL extends Applet implements ActionListener{ public void init
print square of any number
print square of any number  using c++ language, write aprogram to print the square of any number entered by the user
Draw Line
Draw Line  sir i want to draw a moving line in j2me.That line should also show arrow in moving direction. How can we do so
square - Java Beginners
square  what is the java code to display the shape of "square"?  Hi friend, Code to display the shape of "square" import... SquareShape extends Frame { Shape square = new Rectangle2D.Double(100, 100,100
Java draw triangle draw method?
Java draw triangle draw method?  hi how would i construct the draw method for an triangle using the 'public void draw (graphics g ) method? im... a rectangle and this works for a rectangle: public void draw(Graphics g
drawing shapes in applet - Applet
drawing shapes in applet  hi, i need a single applet prgm which draws cone,cube and square in circle.  Hi manju, This is cube example... java.applet.Applet; public class CubeExample extends Applet { Stroke
applet - Applet
.  Hi Friend, Try the following code: 1)Create an applet... extends Applet{ public void paint(Graphics g){ g.drawString("Welcome in Java Applet.",40,20); } } 2) Call this applet with html code
printing hollow square
printing hollow square  Write an application (PrintingSquares.java) that prompts the user to enter the size of the side of a square, then displays a hollow square of that size made of asterisks. Your program should work
Applet - Applet
Applet  what is the concept of applet? what is different between the applet concept and HTML? what is mean by swing?  Hi friend, Applet Applet is java program that can be embedded into HTML pages. Java applets
 

 

 

DMCA.com