import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
public class window
{
JFrame wd;
Container ct;
JPanel title;
JLabel titletext;
Font titleFont;
public static void main(String[] args){
new window();
}
public window(){
wd=new JFrame();
wd.setSize(800,600);
wd.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
wd.getContentPane().setBackground(Color.black);
wd.setLayout(null);
wd.setVisible(true);
ct= wd.getContentPane();
title= new JPanel();
title.setBounds(100,100,600,150);
title.setBackground(Color.blue);
titleFont= new Font("Arial", Font.PLAIN, 28);
titletext= new JLabel("Hello There");
//titletext.setForeground(Color.white);
titletext.setFont(titleFont);
title.add(titletext);
ct.add(title);
}
}
이렇게 배운거 섞었는데 제목 "Hello There"가 안뜬다
중간에 제목색깔때문인가 싶어서 없앴는데도 제목이 안보임
뭔실수지?
