in this tutorial you can add a picture to JFrame in 5 steps.
- add text Editor to Jframe.
- right click --> properties.
- Click Icon --> Import to project.
- then click Ok.
- Click Edit text -- remove generated Text.
Using the code , you can do:
- jLabel1 = new javax.swing.JLabel();
- String icon_xpath = "jLabel4.icon";
- jLabel1.setIcon(icon_xpath); // NOI18N
- jform.Add(jLabel1);
No comments:
Post a Comment