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

📄 borderedpanel.java

📁 DIJKSTRA algorims in Java
💻 JAVA
字号:
package gui;

import javax.swing.*;
import javax.swing.border.*;

public class BorderedPanel extends JPanel {
	private static final long serialVersionUID = 514901490549805915L;
	
	String caption;
	
	public BorderedPanel(String caption) {
		super();
		this.setCaption(caption);
	}
	
	public String getCaption() {
		return this.caption;
	}
	
	public void setCaption(String caption) {
		this.caption = caption;
		putBorder();
	}
	
	public void putBorder() {
		Border etched = BorderFactory.createEtchedBorder();
		Border border = BorderFactory.createTitledBorder(etched, caption);
		this.setBorder(border);
	}
}

⌨️ 快捷键说明

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