2019-11-08 21:13:56 Java

Java

Copy Copied! Full
import javax.swing.*; import java.awt.Container; class a{ public static void main(String args[]){ JFrame frame = new JFrame("タイトル"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); frame.setTitle("TextPaneTest Test"); frame.setBounds( 10, 10, 300, 200); JTextPane textPane = new JTextPane(); JScrollPane scroll = new JScrollPane(textPane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); frame.getContentPane().add(scroll); frame.setVisible(true); } }
RECOMMEND