What is the error?
Type: Posts; User: Karthik Prabhu
What is the error?
Your logic was correct but you have made an error in your program.
The statement,i = in.nextInt();should be inside the do-while loop.
import java.util.Scanner;
public class twelve{
public...
//Abstract Subclass of Fish
abstract class FreshWaterFish extends Fish{
public FreshWaterFish()
{
System.out.println("FreshWaterFish");
...
While writing the "-" operator did u use the one on the numpad or the other one near the "0" ?
Because, when i wrote the program in eclipse,it ran perfectly well.
What error is it showing? Or is the output ,you did not expect,is coming?
When i hit the run button,the emulator screen comes up and the console shows the things below...
[2012-06-30 19:21:53 - xdasdk] ------------------------------
[2012-06-30 19:21:53 - xdasdk] Android...
See,2 frames are being created because u have created 2 objects-app and jftMainFrame
Just study this piece of code and try if u can figure something out. This is a simple example of a ScrollPane.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;...
The code,which i think,should print a message on the frame that the "Mouse is clicked",when the mouse is clicked. The repaint() will get called when the mouse is clicked.
import java.awt.Graphics;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import javax.swing.JFrame;
public class MouseEvent implements...
Thank u very much....It has worked.
Just write f.setVisible(false) and try adding this actionlistener to the frame itself.Try if u can do that.
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JMenuItem cannot be cast to javax.swing.JFileChooser
at Notepad$2.actionPerformed(Notepad.java:70)
at...
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.*;
public class...
what is the highlights tag?
ok fine .i will send u the code tommorrow and then u can check and tell me whats wrong with it. Is that fine?
See my logic is this....
First i created a textfield and then i tried to pass the text string into an array using toChar().Then i wrote an if-else statement(that is,it should print a dialog box when...
Hello,
Can anybody give me the code for this.........
I want the compiler to read the text entered by the user in the textfield and i want the compiler to show a message in a dialogue box if the...
Just try using && instead of || in the second for loop.I think that should solve a major part of the problem.
Hello,i am now learning java swing.I will complete it in a month.So,do you think i will be able to design a good software after learning swing.Or do i need something more than that?