Hi friends
How can i add a vertical and horizontal scroll bar inside a Textarea..
While i created a textarea i cant read the topics down the screen ...
i add a scrollbar but it seperates from textarea , i want to attach that scrollbar with my textarea how is it possible... -
JTextArea area = new JTextArea(40,40);
-
JScrollBar scr = new JScrollBar();
-
-
i call this textarea and scrollbar inside a panel...but it seperates ...
5 3272
Hi friends
How can i add a vertical and horizontal scroll bar inside a Textarea..
While i created a textarea i cant read the topics down the screen ...
i add a scrollbar but it seperates from textarea , i want to attach that scrollbar with my textarea how is it possible... -
JTextArea area = new JTextArea(40,40);
-
JScrollBar scr = new JScrollBar();
-
-
i call this textarea and scrollbar inside a panel...but it seperates ...
Let the TextArea determine for itself whether or not it needs scrollbars. There's
a contructor that does the job:
public TextArea(String text, int rows, int columns, int scrollbars)
... also have a look at the API docs for this class.
kind regards,
Jos
ps. are you sure you don't want Swing's JTextArea instead?
I tried something with JScrollPane , trying,but didnt completed..
i am using swing from javax and awt from java...
public TextArea(String text, int rows, int columns, int scrollbars)
would you please tell me wats the use of String text.bcoz i think textarea needed int columns and rows...wats the use of string there...
Let the TextArea determine for itself whether or not it needs scrollbars. There's
a contructor that does the job:
public TextArea(String text, int rows, int columns, int scrollbars)
... also have a look at the API docs for this class.
kind regards,
Jos
ps. are you sure you don't want Swing's JTextArea instead?
public TextArea(String text, int rows, int columns, int scrollbars)
would you please tell me wats the use of String text.bcoz i think textarea needed int columns and rows...wats the use of string there...
Did you read the API docs for this constructor? I bet you didn't.
kind regards,
Jos
The way i have used it before isnt probably the best way but it works. You can add the textarea to the scrollbar. And then the scrollbar to the panel.
i think its just one of the scrollbar.add() method.
BSCode266
The way i have used it before isnt probably the best way but it works. You can add the textarea to the scrollbar. And then the scrollbar to the panel.
i think its just one of the scrollbar.add() method.
BSCode266
That's not necessary: the TextArea can take care of all that itself. See my
previous replies.
kind regards,
Jos
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Sujan |
last post by:
Hello all,
Is it possible to remove scrollbar(s) without using frames. Is there
any code which could be applied in body tag to remove scrollbar(s).
Thanks in adv,
Sujan
|
by: Price Brattin |
last post by:
I dragged a datagrid onto a VB.Net WinForm and used the properties page and a
few lines of code to set it up, including the DataSource. No wizard setup
was used. It works fine except for one...
|
by: kjs |
last post by:
Is there any was to control the color of the scrollbars when using the
'overflow: scroll' attribute?
TIA,
Karl
|
by: h-h |
last post by:
BODY
{
scrollbar-face-color: #f5f5f5;
scrollbar-highlight-color: #666666;
scrollbar-shadow-color: #666666;
scrollbar-3dlight-color: #ffffff;
scrollbar-arrow-color: #666666;...
|
by: Shun |
last post by:
Hello,
How to the add a blue color scrollbar to the browser Left and bottom.
Thanx
Shun
|
by: d.steininger |
last post by:
Hi there!
Is there a way to bind a Textbox.Text to a ScrollBar.Value (not the
Textbox-own Scrollbar) and vice versa?
The Problem:
I have to deal with two controls. The Textbox should accept...
|
by: Michael Weis |
last post by:
Hello all,
as a non-professional in these things, I searched for this topic but found
no satisfying answer:
I have to create a site with 3 frames. (Please no diskussion about the sense
of...
|
by: kurt sune |
last post by:
How do I render the scrollbars by CSS in a listbox?
I have understood that an asp listbox gets rendered as a select element.
So I tried first by adding a style element:
..TA...
|
by: nicky77 |
last post by:
Hi, before you say it i know frames are bad practice - but i'm developing dynamic content on a site which has already been designed, so alas there's no option but to use them. Anyway, I just want to...
|
by: Tom |
last post by:
First, I posted a similar request for help in another group and now
don't find the posting. Problem with my newsreader perhaps ... but
apologies if this appears as a cross posting.
My code is...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |