
what is code for dislay image on java swinginternalframe form MYSQL DB pls send

Here is a code that displays an image on internal frame.
import java.awt.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
public class ImageInJInternalFrame extends JDesktopPane {
public static void main(final String[] args) throws IOException {
final ImageInJInternalFrame desktop = new ImageInJInternalFrame();
desktop.addPicture(ImageIO.read(new File("c:/bird.png")));
final JFrame frame = new JFrame("Show Image");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(BorderLayout.CENTER, desktop);
frame.setSize(400, 200);
frame.setVisible(true);
}
public void addPicture(final Image image) {
add(createFrame(image));
}
private static int frames;
private JInternalFrame createFrame(final Image image) {
final JInternalFrame frame = new JInternalFrame("Picture ");
frame.add(BorderLayout.CENTER, new JLabel(new ImageIcon(image)));
frame.pack();
frame.setVisible(true);
frame.setLocation(40 * frames, 40 * frames);
return frame;
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.