Search:

Type: Posts; User: hope_08

Search: Search took 0.19 seconds.

  1. Re: Username/Password Different Classes Java program help

    Hi,

    You can validate email address using regular expression. Google it and you will be able to find it.
  2. Replies
    4
    Views
    1,746

    Re: draw can't be resolved. Help!

    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...
  3. Replies
    2
    Views
    949

    Re: object oriented program help!!!

    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....
  4. Thread: printing

    by hope_08
    Replies
    1
    Views
    1,041

    Re: printing

    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...
  5. Re: com.opensymphony.xwork2.util.logging.commons.Commo nsLogger error Dispatcher initialization failed

    Hi

    It may b because you have not proper xwork jar required for the application..
  6. Replies
    4
    Views
    1,746

    Re: draw can't be resolved. Help!

    Hi

    what is the draw class here , the object for which is created... have you created one?
  7. Replies
    6
    Views
    8,981

    [SOLVED] Re: Scanner closed error

    hi

    have appended the wid your code below

    public class capital
    {public static void main(String[] args) throws FileNotFoundException
    {
    // ask the user for...
  8. Replies
    4
    Views
    1,246

    Re: Trouble with Java menubar in java frame.

    Hi

    You should provide label for exit menu item. i.e JMenuItem exit = new JMenuItem("Exit");
  9. Replies
    3
    Views
    981

    Re: retrieve next character in alfabet

    Hi
    in the next function get the letter say
    char let = getLetter();
    let ++ ;

    This will give you the next alphabet.
  10. Replies
    6
    Views
    8,981

    [SOLVED] Re: Scanner closed error

    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...
  11. Replies
    6
    Views
    8,981

    [SOLVED] Re: Scanner closed error

    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;...
  12. Replies
    19
    Views
    1,885

    Re: Encrypt a text message

    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...
  13. Replies
    19
    Views
    1,885

    Re: Encrypt a text message

    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...
  14. Re: How to call printDate method to output the dates?

    Hi,

    just call the static function using Date.printDate(date1); in place of System.out.println (printDate(date1));
  15. Replies
    19
    Views
    1,885

    Re: Encrypt a text message

    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...
  16. Replies
    2
    Views
    1,175

    Re: swapping integers OOP

    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...
  17. Replies
    2
    Views
    1,963

    Re: ArrayList weird display error

    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 ...
  18. Re: Whats wrong with this it's not displaying inside component

    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");...
  19. Replies
    7
    Views
    1,235

    Re: what is the way to Calculate

    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)
  20. Replies
    8
    Views
    1,167

    Re: What's wrong with my code?

    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...
  21. Re: Calculating time taken - does this look right? Error!

    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...
  22. Re: JLabel not appearing in new Frame ? please help

    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...
  23. Thread: GPS marker

    by hope_08
    Replies
    2
    Views
    1,139

    Re: GPS marker

    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...
  24. Replies
    8
    Views
    1,167

    Re: What's wrong with my code?

    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;...
  25. Replies
    12
    Views
    1,910

    Re: Interger.parseInt Question

    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...
Results 1 to 25 of 25