bhojnp's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
17 (0.03 per day)
Joined:
18-September 11
Profile Views:
379
Last Active:
User is offline Dec 18 2011 01:03 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   bhojnp has not set their status

Posts I've Made

  1. In Topic: Java Session objects

    Posted 28 Nov 2011

    Yes, thank you so much .now i got it ..

    View Postpbl, on 28 November 2011 - 10:30 PM, said:

    Create a Permission class that contains the permissions, or an int with flags
    Associate a Permission object, or a int, to all your users
    Pass it as parameter to your new UserPage(); constructor

    String[] username = {"Peter", "Paul", "Ringo", "John"};
    String[] password = {"mac", "mosty, "g00se", "fuzzy"};
    int[] permission = {1, 2, 3, 4};
    
    for(int i = 0; i < username.length; i++) {
        if(username[i].equalsIgnoreCase(name1) {
           if(password[i].equalsIgnoreCase(pw1) {
              UserPage up = new UserPage(permisssion[i]);
              up.show();
              return;
           else {
             ... invalid password
           }
           break;
         }
    }
    ... invalid username
    
    
  2. In Topic: Java Session objects

    Posted 28 Nov 2011

    Its not multithread program... its simple ..even there will be 3/4 hard coded users.
    the main focus of this program is to make session object and limit the access. after login only admin user( user = admin, password= admin) have access to click add user and delete user button .. even i dont need to implement the add/delete feature. If admin user click on add user button i have to display " new user create message" . if other user click on this button the message will be " You have no right to add user " .. but i have to maintain it by making session objects.... hoping for your suggestion.. plz check ur message i send me email.

    View Postpbl, on 28 November 2011 - 10:03 PM, said:

    Yes but is it multithread ?
    How does your users start the application ?
    Do 20 users around the world share the same GUI in the same host ?


    Its not multithread program... its simple ..even there will be 3/4 hard coded users.
    the main focus of this program is to make session object and limit the access. after login only admin user( user = admin, password= admin) have access to click add user and delete user button .. even i dont need to implement the add/delete feature. If admin user click on add user button i have to display " new user create message" . if other user click on this button the message will be " You have no right to add user " .. but i have to maintain it by making session objects.... hoping for your suggestion.. plz check ur message i send me email.

    View Postpbl, on 28 November 2011 - 10:03 PM, said:

    Yes but is it multithread ?
    How does your users start the application ?
    Do 20 users around the world share the same GUI in the same host ?
  3. In Topic: Java Session objects

    Posted 28 Nov 2011

    Yes, PBL . it is GUI program and it is my assignment so i cant copy and pest whole my code here.. can i send you my whole program code in ur email/message?

    View Postpbl, on 28 November 2011 - 09:43 PM, said:

    Are you talking of a multi thread application/GUI where users connect as Client and share the same GUI ?
    How the users start your application ?
  4. In Topic: Java Session objects

    Posted 28 Nov 2011

    yes i did mistake in typing
    UserPanel obj= new UserPanel();
    obj.showform();
    
    
    


    userpage is another class that contain the information after userlogin. different user have different information to acess.

    View Postpbl, on 28 November 2011 - 09:20 PM, said:

    First,m this won't compile
    
    Obj=new UserPage();
    Obj.showform();
    
    

    unless OBJ is defined somewhere else as a UserPage()

    And what is a UserPage ?

    What prompts the user for username and password, that what is calling Login ?


    View Postbhojnp, on 28 November 2011 - 09:28 PM, said:

    yes i did mistake in typing
    UserPanel obj= new UserPanel();
    obj.showform();
    
    
    


    userpage is another class that contain the information after userlogin. different user have different information to acess.

    View Postpbl, on 28 November 2011 - 09:20 PM, said:

    First,m this won't compile
    
    Obj=new UserPage();
    Obj.showform();
    
    

    unless OBJ is defined somewhere else as a UserPage()

    And what is a UserPage ?

    What prompts the user for username and password, that what is calling Login ?
  5. In Topic: Java Syntax

    Posted 22 Nov 2011

    thanks for all of your comments now i understand little bit . actually i tried to check below case and found the wrong answer when i was used ==

    String original1= " hello";
    String reverse= "olleh";
    
    //Case 1
    if (original1.equals(reverse))
    System.out.println("both are equal");
    else
    System.out.println("both are not equal";
    
    //case 2
    if (original1==reverse))
    System.out.println("both are equal");
    else
    System.out.println("both are not equal";
    
    
    


    for the case 2 i found answer for palindrome check

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

bhojnp has no profile comments yet. Why not say hello?