Search code examples
integerjpanelsizeframejtextarea

Set JTextArea frame size with Integer


Is it possible to set the size of a JTextArea with Integer?
Because when i use

static JTextArea textfeld = new JTextArea(33, 90);

it wont make a Textarea with Int but some other size.
So is there any way to set the size of it with integer?

Sorry for my bad grammar D:


Solution

  • You can use textfeld.setBounds(int allignmentX, int allignmentY, int height, int width); to set the bounds of the JTextArea.