java - How can I Give a JTextPane a different width than the main JFrame? -


Therefore, when I create a JTextPane and add it to JFrame, it fills the frame, moves forward with it. How do I stop it, so that I can pen? Setsy?

jehphm in the API JFrame.add (JTextPane, BorderLayout.CENTER)

If only A JComponent is placed in the JFrame , then (center area) fills all available dimensions

  • Use JScrollPane < / Ol>

  • Comments