⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bqtitlebar.java

📁 J2me唆哈的代码
💻 JAVA
字号:
/*
 * Created on 2005-9-20 by pcy
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package a.a.a.midp.lcdui;

import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
public class BQTitleBar extends JPanel {
    public static final long serialVersionUID=1;
    
    BQDisplayable displayable;
    JLabel title;
    
    public BQTitleBar(BQDisplayable p) {
        super();
        displayable=p;
        this.setLayout(null);
        title=new JLabel();
        title.setFont(title.getFont().deriveFont(Font.BOLD));
        this.add(title);
        this.setBackground(BQDisplayable.BACKGROUND_COLOR);
        //this.setBorder(LineBorder.createBlackLineBorder());
    }
    
    public String getTitle(){
        return title.getText();
    }
    
    public void setTitleText(String text){
        title.setText(text);
        title.setBounds(5,0,displayable.getDisplayWidth(),BQDisplayable.TITLE_BAR_HEIGHT);
    }
    
    public void resizeScreen(){
    	title.setBounds(5,0,displayable.getDisplayWidth(),BQDisplayable.TITLE_BAR_HEIGHT);
    }
 }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -