import java.awt.*;
import javax.swing.*;
public class LyricsUI extends JFrame {
private Container cp;
private JTextPane lyricsPanel ;
private JPanel panel;
private JScrollPane scrollPanel;
public LyricsUI(){
super();
init();
}
public void init(){
this.setSize(new Dimension(300, 379));
this.setLocation(500,100);
lyricsPanel = new JTextPane();
lyricsPanel.setSize(new Dimension(300,379));
lyricsPanel.setBackground(Color.WHITE);
//lyricsPanel.setText(this.test().getText());
lyricsPanel.setText("dsdsadasdas");
scrollPanel = new JScrollPane();
scrollPanel.setLayout(new ScrollPaneLayout());
scrollPanel.add(lyricsPanel);
cp = getContentPane();
cp.setLayout(new BorderLayout());
// cp.add(panel,BorderLayout.NORTH);
cp.add(scrollPanel,BorderLayout.CENTER);
this.setResizable(false);
this.setVisible(true);
}
/*public Lyrics test(){
Lyrics l = new Lyrics();
File f = new File("C:\\KuGoo\\Lyrics\\李圣杰 - Angel.lrc");
Lyrics ll = l.read(f);
return ll;
}*/
public static void main(String[] args) {
new LyricsUI();
}
}
import javax.swing.*;
public class LyricsUI extends JFrame {
private Container cp;
private JTextPane lyricsPanel ;
private JPanel panel;
private JScrollPane scrollPanel;
public LyricsUI(){
super();
init();
}
public void init(){
this.setSize(new Dimension(300, 379));
this.setLocation(500,100);
lyricsPanel = new JTextPane();
lyricsPanel.setSize(new Dimension(300,379));
lyricsPanel.setBackground(Color.WHITE);
//lyricsPanel.setText(this.test().getText());
lyricsPanel.setText("dsdsadasdas");
scrollPanel = new JScrollPane();
scrollPanel.setLayout(new ScrollPaneLayout());
scrollPanel.add(lyricsPanel);
cp = getContentPane();
cp.setLayout(new BorderLayout());
// cp.add(panel,BorderLayout.NORTH);
cp.add(scrollPanel,BorderLayout.CENTER);
this.setResizable(false);
this.setVisible(true);
}
/*public Lyrics test(){
Lyrics l = new Lyrics();
File f = new File("C:\\KuGoo\\Lyrics\\李圣杰 - Angel.lrc");
Lyrics ll = l.read(f);
return ll;
}*/
public static void main(String[] args) {
new LyricsUI();
}
}
学习需要安静。。海盗要重新来过。。