标题:怎么显示不出来?
只看楼主
sunkaidong
Rank: 4
来 自:南京师范大学
等 级:贵宾
威 望:12
帖 子:4496
专家分:141
注 册:2006-12-28
得分:0 
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();

    }

}

学习需要安静。。海盗要重新来过。。
2008-03-18 09:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-203738-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021858 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved