Hi,
You can validate email address using regular expression. Google it and you will be able to find it.
Type: Posts; User: hope_08
Hi,
You can validate email address using regular expression. Google it and you will be able to find it.
Hi
I feel u need to create object of Drawing class instead of draw. Because there is no class as draw here.
So instead of draw object = new draw(); use Drawing object = new Drawing();
and then...
hi
You again creating the object of rectangle and trying to find the area.
Instead in the same for loop while getting the no of rectangles created, get the area and perimeter....
hi
create a print button
JButton printButton = new JButton("Print");
printButton.addActionListener(new GUIWindow); (where guiwindow is the class that contains your frame and its object)
then...
Hi
It may b because you have not proper xwork jar required for the application..
Hi
what is the draw class here , the object for which is created... have you created one?
hi
have appended the wid your code below
public class capital
{public static void main(String[] args) throws FileNotFoundException
{
// ask the user for...
Hi
You should provide label for exit menu item. i.e JMenuItem exit = new JMenuItem("Exit");
Hi
in the next function get the letter say
char let = getLetter();
let ++ ;
This will give you the next alphabet.
Hi
You can define a counter variable "found" before the while loop as int found = 0;
increment it i.e found++ in the if condition.
and outside the while loop put the below condition
if...
Hi
You need to put the statement countryInput.close(); i.e close the scanner after the while loop.
And for displaying the message define a variable found before the while loop as int found = 0;...
hi
after removing the spaces if its not a squareroot then keep a check like
find squareroot of n and round the result up for eg if your string length is 7 then when you find...
hi
so you need to check after removing spaces that if its not a square root and proceed by adding that much space to make it a square root?
if no then you can jst keep a check like if its not a...
Hi,
just call the static function using Date.printDate(date1); in place of System.out.println (printDate(date1));
hi
you dnt need to replace string s .
instead take n as full string with space. And check whether the string length gives perfect square.If its yes then
take char[][] box = new...
Hi,
In swap function
temp = this.X;
this.X = this.Y;
this.Y = temp;
and in the demoswap function the last two lines should display The value of X as tempZ.getX() and the value of Y as...
hi
you just need to get the name and the phone number from the PhoneBookEntry object when you display.
i.e in the println statement inside displayEntry function you need to use ...
You need to create a jframe and add the jpanel component to it. jpanel cannot be displayed on its own.
so you can modify the code as
JFrame jframe1 = new JFrame("NewFrame");...
hi
well if we trace the code then
a = 1+5 =6;
b = 2*4 = 8;
c = 3 + 48 =51;
c = 51%6 = 3 (since dividing 51 by 6 gives remainder 3)
If Output is as swing component like JLabel then you can use this setText method to set its text to the output you got earlier.
You just need to use for eg if you are directing your output to be...
hi
You need to have the method defined as public static long timeTaken() and return a long variable say message. where message = endTime - startTime.
And in the main method you need to call...
Hi
You need to specify a layout for displaying swing components.
Say for eg you can set the frame layout to flowlayout (Flowlayout simply lays out components in a single row,)
use this statement...
Hi,
Well you can set the function that displays the marker to some time interval.
For eg : say your function displaying the marker is function1 then you can use the...
Hi,
You just need to use one loop that goes until the expo = 10 is reached.
so you need to modify your code as
say if your input variable base = 2 and Expo = 10
for (int x = 1; x <= Expo;...
Hi,
When an application is launched, the runtime system passes the command-line arguments to the application's main method via an array of Strings. You need to pass arguments while you run this...