Ask Experts Questions for FREE Help !
Ask
    jakob991's Avatar
    jakob991 Posts: 1, Reputation: 1
    New Member
     
    #1

    Apr 28, 2015, 06:33 PM
    Java setContentFrame over lapping JLabel? How do I fix it
    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;


    public class Gui_Window extends JFrame {
    /**
    *
    */
    private static final long serialVersionUID = 1L;
    private JLabel Main_L;

    public Gui_Window() {
    setLayout(new FlowLayout());

    Main_L = new JLabel("Did you know it is possible to bind keys?");
    add(Main_L);
    }

    public static void main (String args[]) {
    Gui_Window gui = new Gui_Window();
    try{
    gui.setContentPane(new JLabel(new ImageIcon(ImageIO.read(new File("C:/Users/Owner/Desktop/test/test.JPG")))));

    }catch(IOException e)

    {
    System.out.println("Image Not Found");
    }
    gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ;
    gui.setTitle("Gamers AudioMute");
    gui.setResizable(false);
    gui.setSize(1200,800);
    gui.setBackground(Color.YELLOW);
    gui.setVisible(true);

Check out some similar questions!

What all topics comes under advance java?what is framework how it is related to java? [ 0 Answers ]

I want to know about the topics related to advance java?and how the framework likke struts and hibernate realted to each other?what are there uses?

I am new to java GUI and multiple classes, I have knowledge of core java. I have [ 0 Answers ]

Sir, I am new to java GUI and multiple classes, I have knowledge of core java. I have to call a rest client from my net beans project give values to it and receive it's output in the same project. Please suggest me what I need to study and what to do.

Please fix this java question with code [ 2 Answers ]

Please fix this coding with Java Programming. Vehicle Make.. Model.. Noise Factor... InterstatePermitscurrent... Parking Fines Holden... Colorado... 2.. . 0 Chrysler... Aspen... 3.. . 0 Toyota... Lite Ace... 4.. . 0 Ford... F350... 5... ….. . 0 Dodge... Sprinter... 6.. . 2 Hino......

Java netbeans program- Connection between java and mysql,How to conn [ 0 Answers ]

which I wrote from a book but when I run it, it shows exception please give me the code to connect jlistbox to database when I click on btn1. btn coding should search "name" in database and shows all the names in listbox my coding: here-- r1,r2,r3 are radio btns and l1,l2,l3 are labels,...

Words over lapping [ 1 Answers ]

Can someone tell me why words would be over lapping and also some pages I can not see everything. Thanks


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.