Well I am using the NetBean 6.9 Desktop appliction builder and am stuck with getting to paint an image into a jPanel. I have it code right I think but for some reason it does not show up in the pannel do I have to set it to visable or something?
Thanks for any help
here is what I am doing:
private void userinfosubActionPerformed(java.awt.event.ActionEvent evt) { // this is for submit button to access user info on server userName = usertext.getText(); System.out.println("User Name: " + userName); userPass = passText.getText(); System.out.println("User Password: " + userPass); //now validate user infor from server: //then print out user name and a nice little welcome mesg userInfo.setText("Welcome Back " + userName + " to the best shoping you can get!"); ProductDescriptionArea.append("Product Name: \n" + productName+ "\n"); ProductDescriptionArea.append("Product Discription: \n" + productDis); try { BufferedImage myPicture = ImageIO.read(new File("C:/Users/Kenshin/Desktop/Products/inuFinalAct.jpg")); JLabel picLabel = new JLabel(new ImageIcon( myPicture )); picturePane.add(picLabel); } catch (IOException ex) { Logger.getLogger(Project4GUIView.class.getName()).log(Level.SEVERE, null, ex); } }