Thread: 317 Evolve pk help please

Results 1 to 9 of 9
  1. #1 317 Evolve pk help please 
    Registered Member
    Join Date
    Oct 2020
    Posts
    27
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    i got the server running fine but get this when i run the client


    House_icon.png
    java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:240)
    at com.arlania.Jframe.createButton(Jframe.java:287)
    at com.arlania.Jframe.initializeMenuBar(Jframe.java:2 45)
    at com.arlania.Jframe.initUI(Jframe.java:124)
    at com.arlania.Jframe.<init>(Jframe.java:46)
    at com.arlania.Client.main(Client.java:5919)


    Will rep and thanks for help
    Reply With Quote  
     

  2. #2  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,551
    Thanks given
    176
    Thanks received
    5,760
    Rep Power
    5000
    well, this isnt the client section, and it seems that image is null, the error explains itself.

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Oct 2020
    Posts
    27
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Luke132 View Post
    well, this isnt the client section, and it seems that image is null, the error explains itself.
    sorry for posting in wrong place.. any idea how i would fix that



    does it have something to do with this


    /**
    * Creates a button on the menu panel
    *
    * @[Only registered and activated users can see links. ] title
    * The Title of the button
    * @[Only registered and activated users can see links. ] image
    * The image to display
    * @[Only registered and activated users can see links. ] tooltip
    * The tooltip when hovering over the button
    * @[Only registered and activated users can see links. ] The created button
    */
    private JButton createButton(String title, String image, String tooltip) {
    JButton button = new JButton(title);
    if (image != null)
    button.setIcon(new ImageIcon(ResourceLoader.loadImage(image)));
    button.addActionListener(this);
    if (tooltip != null)
    button.setToolTipText(tooltip);
    button.setBorder(BorderFactory.createEmptyBorder() );
    button.setContentAreaFilled(false);
    button.setCursor(new Cursor(Cursor.HAND_CURSOR));
    button.setForeground(Color.WHITE);
    return button;
    }
    Reply With Quote  
     

  4. #4  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,551
    Thanks given
    176
    Thanks received
    5,760
    Rep Power
    5000
    Quote Originally Posted by ToxicKush View Post
    sorry for posting in wrong place.. any idea how i would fix that
    i mean, it tells u where the problem is

    and the fact it says image.png, common sense (and the actual error text) tells me something its to do with an image called House_icon.png, so i'd start there. its java, not swahili.

    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Oct 2020
    Posts
    27
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Luke132 View Post
    i mean, it tells u where the problem is

    and the fact it says image.png, common sense (and the actual error text) tells me something its to do with an image called House_icon.png, so i'd start there. its java, not swahili.
    kinda new to this really so dont really get it but thanks for the info bro
    Reply With Quote  
     

  6. #6  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,551
    Thanks given
    176
    Thanks received
    5,760
    Rep Power
    5000
    Quote Originally Posted by ToxicKush View Post
    sorry for posting in wrong place.. any idea how i would fix that



    does it have something to do with this


    /**
    * Creates a button on the menu panel
    *
    * @[Only registered and activated users can see links. ] title
    * The Title of the button
    * @[Only registered and activated users can see links. ] image
    * The image to display
    * @[Only registered and activated users can see links. ] tooltip
    * The tooltip when hovering over the button
    * @[Only registered and activated users can see links. ] The created button
    */
    private JButton createButton(String title, String image, String tooltip) {
    JButton button = new JButton(title);
    if (image != null)
    button.setIcon(new ImageIcon(ResourceLoader.loadImage(image)));
    button.addActionListener(this);
    if (tooltip != null)
    button.setToolTipText(tooltip);
    button.setBorder(BorderFactory.createEmptyBorder() );
    button.setContentAreaFilled(false);
    button.setCursor(new Cursor(Cursor.HAND_CURSOR));
    button.setForeground(Color.WHITE);
    return button;
    }
    is that any of the code that is referenced in the error message

    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Oct 2020
    Posts
    27
    Thanks given
    4
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Luke132 View Post
    is that any of the code that is referenced in the error message
    button.setIcon(new ImageIcon(ResourceLoader.loadImage(image)));<<<<<< <<<<<<<<<this is

    at com.arlania.Jframe.createButton(Jframe.java:287)<< <<<<<<<<<<<<this
    Reply With Quote  
     

  8. #8  
    Donator

    Kid Buu's Avatar
    Join Date
    Aug 2017
    Posts
    423
    Thanks given
    167
    Thanks received
    222
    Rep Power
    399
    Seems like you're missing House_icon.png, as Luke suggested you should really read the error messages. If you're too new to understand the simplest of errors you should focus on learning java before working on a server.
    Reply With Quote  
     

  9. #9  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,551
    Thanks given
    176
    Thanks received
    5,760
    Rep Power
    5000
    Quote Originally Posted by ToxicKush View Post
    button.setIcon(new ImageIcon(ResourceLoader.loadImage(image)));<<<<<< <<<<<<<<<this is

    at com.arlania.Jframe.createButton(Jframe.java:287)<< <<<<<<<<<<<<this
    im guessing it cant load the image..

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 5
    Last Post: 05-07-2020, 04:26 PM
  2. Few [PI] 317 issues need help please.
    By mighty in forum Help
    Replies: 4
    Last Post: 07-06-2012, 12:31 AM
  3. 317 [PI] korasi help please!
    By Cody289 in forum Help
    Replies: 50
    Last Post: 07-05-2012, 01:17 PM
  4. 317 Server + Client Help Please!
    By Rune Sage in forum Help
    Replies: 1
    Last Post: 07-28-2011, 01:36 AM
  5. 317 Client Error Help Please
    By tommy1234 in forum Help
    Replies: 1
    Last Post: 11-13-2010, 05:58 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •