Jump to content
Sign in to follow this  

JSCrollPane problemer idag

Recommended Posts

jeg har altså


//hent innholdsfortegnelsen

Container cp;


//legg til tekstområde i center

JTextArea jta;

jta=new JTextArea();



og vil legge til en JSCrollPane til textområdet. Forstår ikke heelt hvordan jeg skal gjøre det. Er en del av en nybegynneropppgave på skolen, dette her, så ikke vær for avansert, takk ;)

Edited by BagBiter

Share this post

Link to post

JTextArea area = new JTextArea();
JScrollPane scroller = new JScrollPane (area);


Ikke mer avansert enn det :-)


og dette ja....

cp.add(scroller, BorderLayout.CENTER);

Edited by MissCB

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...