Using Textarea Scrollbars
Before I started using Dreamweaver, I used notepad. And I
would use textarea scrollbars for excessive text.
http://www.funky-chickens.com/tarea.shtml
...At the bottom, where it says Textarea allowing HTML. I usually
use that on my previous websites. But using dreamweaver, when I
install that snippet it creates problems and the tables stretch and
screws up the whole site. How do I make that function work. I
looked around and couldn't find that option
Can anyone help me?
A reference to how I use it:
http://leyendarecords.com/biography.html
... Theres a website I made for someone. If you check out that
page, you can see that I have scrollbars and text inside it. A
friend made that template on Dreamweaver and I did everything on
Notepad. Exactly how do I do that?
That code is SO ANTIQUE it's unbelievable.
<ilayer name="scroll1">
<div id="scroll3"
style="width:100;height:75;
background-color:COLORHERE;
overflow:auto">
TEXT HTML TEXT HTML
</textarea></div>The <ilayer> tag is not
recognized by any browser than
NN4x, and that browser is nearly extinct. In addition, they
even omit the
opening <textarea> tag and the closing </ilayer>
tag, so in addition to
being hopelessly antique, it's invalid too.
> But using dreamweaver, when I install that snippet it
> creates problems and the tables stretch and screws up
the whole site. How
> do I
> make that function work.
That's not surprising. DW doesn't know what to do with this
markup.
You could try just removing the <ilayer> tag -
<div id="scroll3"
style="width:100px;height:75px;background-color:COLORHERE;overflow:auto"><textarea>
TEXT HTML TEXT HTML</textarea></div>
but all form elements are required to be within an explicit
<form>, so
you'll have to add that -
<div id="scroll3"
style="width:100px;height:75px;background-color:COLORHERE;overflow:auto"><form>
<textarea>TEXT HTML TEXT
HTML</textarea></form></div>
And then both the form tag and the textarea tag have some
necessary
attributes, so you'll have to add them too....
I recommend you not use something like this, anyhow. There is
a good
discussion on this forum from just today about why it's a
poor layout/design
decision....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"streekd" <[email protected]> wrote in
message
news:[email protected]...
> Before I started using Dreamweaver, I used notepad. And
I would use
> textarea
> scrollbars for excessive text.
http://www.funky-chickens.com/tarea.shtml
> ...At
> the bottom, where it says Textarea allowing HTML. I
usually use that on my
> previous websites. But using dreamweaver, when I install
that snippet it
> creates problems and the tables stretch and screws up
the whole site. How
> do I
> make that function work. I looked around and couldn't
find that option
>
> Can anyone help me?
>
> A reference to how I use it:
http://leyendarecords.com/biography.html
> Theres a website I made for someone. If you check out
that page, you can
> see
> that I have scrollbars and text inside it. A friend made
that template on
> Dreamweaver and I did everything on Notepad. Exactly how
do I do that?
>
Similar Messages
-
Remove Html textarea scrollbar from jeditorpane
Hi,
I am using jeditorpane for display a content in my project,
i am create html code and set to jeditorpane, but in my code i am using textarea for display large text,
what my problem is in the textarea is not at all wrap and even small text also its show scrollbar,
i want to remove the scrollbar and wrap properly, can any one give some idea is highly useful to solve my problem.
my code is
setContentType("text/html"_);
HTMLEditorKit kit = new HTMLEditorKit();
super.setEditorKit(kit);
StyleSheet styleSheet = kit.getStyleSheet();
styleSheet.addRule("textarea {style=border:4; overflow:auto; wrap:virtual}");
styleSheet.addRule("body {color:#000; font-family:times; margin: 1px }");
StringBuffer sb = new StringBuffer();
// in this string buffer i am append all the html code
setText( sb.toString() );Thanks in advance.This is the technique I use.
1. Create 2 identical columns, one with the HTML and one without.
2. Then conditionally display the columns, one to display in the web page and the other to display in the download. This can easily be done using the request value e.g.
Condition Type: Request Is NOT Contained within Expression 1
Expression1: CSV,PDF,RTF,XLS
I hope that does the trick for you :)
Simom -
I cannot seem to get a browser (in this case IE 7) to show
scrollbars for any Flex application. While I know how to use Flex
scrollbars, they do not make up for browser scrolling, especially
considering the flex scrollbars themselves have a tendency to get
clipped out of a browser window. Is there a solution for this, or
does using Flex automatically preclude a browser's ability to
scroll.
I noticed that on sample applications, like the Flex Store,
this is an issue as well.
Any advice would be much appreciated.We are having this exact problem. This is a pretty crazy
problem. It seems like inner containers are not "pushing" the outer
containers out far enough. The only resolution that I can find is
to set a bunch of static sizes for containers, but then we lose the
flexibility. Any ideas? The scrollbars are ridiculous cause they
are constantly getting cut off by the browser or are there when
they shouldn't be. Is there a better way for apps with multiple
layers that are larger than the normal height of a screen? -
How to Freeze Table/Column Header "without using additional scrollbars" ?
hi people,
I am hoping someone can help me here. I have a large table and would like to freeze the first row. Scrolling down the table "_*using the existing scrollbars*_" in the browser while ensuring the header rows are still visible (like Excel when you freeze panes). If you scroll to the right the header rows should stay frozen and not follow.
I know there are other threads which talk about freezing table/column header, but my requirement is to have it "without using additional scrollbar".
Thanks in advance,
RAKESHHi,
there is no default key for this. You will have to code your own JavaScript for this. Also, I am not sure you want the column to be selected but a field in the column for the row you are in - correct ?
Frank -
Using textarea to write data to html files
Hi. I am trying to make an application to change contents of html files. I used filereader and filewriter constructors but I guess I have a problem with using textarea. I want the data from the file to appear in a textarea so I can edit it and save.
boolean saveFile () {
JTextArea textarea = new JTextArea();
JFrame frame = new JFrame();
frame.add(textarea);
File file = null;
File fFile = new File ("default.java");
JFileChooser fc = new JFileChooser ();
htmlFilter fhtmlFilter = new htmlFilter();
// Start in current directory
fc.setCurrentDirectory (new File ("."));
// Set filter for Java source files.
fc.setFileFilter (fhtmlFilter);
// Set to a default name for save.
fc.setSelectedFile (fFile);
// Open chooser dialog
int result = fc.showSaveDialog (this);
if (result == JFileChooser.CANCEL_OPTION) {
return true;
} else if (result == JFileChooser.APPROVE_OPTION) {
fFile = fc.getSelectedFile ();
return writeFile (file,textarea.getText);
return true;
// saveFile
boolean openFile () {
htmlFilter fhtmlFilter= new htmlFilter();
File file = new File("");
JTextArea textarea = new JTextArea();
JFileChooser fc = new JFileChooser ();
fc.setDialogTitle ("Open File");
// Choose only files, not directories
fc.setFileSelectionMode ( JFileChooser.FILES_ONLY);
// Start in current directory
fc.setCurrentDirectory (new File ("."));
// Set filter for Java source files.
fc.setFileFilter (fhtmlFilter);
// Now open chooser
int result = fc.showOpenDialog (this);
if (result == JFileChooser.CANCEL_OPTION) {
return true;
} else if (result == JFileChooser.APPROVE_OPTION) {
file = fc.getSelectedFile ();
JFrame frame= new JFrame();
frame.add(textarea);
frame.pack();
frame.setVisible(true);
// Invoke the readFile method in this class
return writeFile (file, textarea.getText ());
return true;
} // openFile
public static boolean writeFile (File file, String dataString) {
try {
PrintWriter out =
new PrintWriter (new BufferedWriter (new FileWriter (file)));
out.print (dataString);
out.flush ();
out.close ();
catch (IOException e) {
return true;
} // writeFile
public String readFile(File file)
JFrame frame= new JFrame();
JTextArea textarea = new JTextArea();
frame.add(textarea);
StringBuffer contents = new StringBuffer();
//declared here only to make visible to finally clause
BufferedReader input = null;
try {
//use buffering, reading one line at a time
//FileReader always assumes default encoding is OK!
input = new BufferedReader( new FileReader(file) );
String line; //not declared within while loop
* readLine is a bit quirky :
* it returns the content of a line MINUS the newline.
* it returns null only for the END of the stream.
* it returns an empty String if two newlines appear in a row.
while (( line = input.readLine()) != null){
System.out.println(line);
catch (FileNotFoundException ex) {
ex.printStackTrace();
catch (IOException ex){
ex.printStackTrace();
finally {
try {
if (input!= null) {
//flush and close both "input" and its underlying FileReader
input.close();
catch (IOException ex) {
ex.printStackTrace();
return contents.toString();
}Sorry this didn't get a response sooner. You can alter the way your consumer loop writes the data to file by altering the data that you send through the queue. I would suggest clustering your data (the array you currently send) with an array of booleans. Then you can unbundle this cluster in the consumer loop before you write to file and use it accordingly. This should allow you to do what you're trying to do.
Just to give you some feedback on your code, there are few things that you can improve upon. I'm sure this is a learning process so you probably know a lot more about LabVIEW now than you did when you started.
All of your array operations in there can be done much simpler. You have a whole Index Array node that inputs 8-21 in order. This can be done by simply having an 8 at the beginning and dragging the rest down since the indices always count from the previous by default. You are also doing a lot of indexing and re-building of arrays. You should look int o Array Subset VI and Array To Cluster node to consolidate here.
You have a lot of indicators and controls that coudl be consolidated in to array and/or clusters. Your "element 1", "element 2", etc indicators are all displayed on the front panel next to each other, so why not just display them as an array?
You use property nodes in a couple places to read the values. This can be better done by a local variable. Property nodes shouldn't usually be read from continuously. -
How to make JTable use horizontal scrollbar
My application uses a table to which data is added dynamically(both columns and rows). My problem is that when number of columns increase i want JTable to use horizontal scrollbar instead of resizing columns(which i achieve by setting resize mode to OFF state), But due to this if number of columns are less then there's alot of empty space left after showing columns(coz JTable cannot resize cols to fit Viewport area). To achieve both criteria i used following solution
1. Set Auto resizing to OFF.
2. Check if width of table is less than viewport width and if so then set auto
auto resizing ON :) which will fit columns in viewport thereby occupying empty space.
But this solution doesn't seem to be straight and simple to me. Is anyone aware of a simple solution to this problem.
Dimension dm_Dm = new Dimension();
RSBrowser.setModal(false);
browseTable_Jt.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// reqd o.w. JTable resizes column widths instead of using horizontal
// scrollbar
RSBrowser.setVisible(true);
browseTable_Jt.getSize(dm_Dm);
// if table width is less than total viewport size then fill the extra
// space by setting suto resize property to ON.
if ( browseTable_Jt.getPreferredScrollableViewportSize().getWidth() >
dm_Dm.getWidth() )
browseTable_Jt.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
browseTable_Jt.doLayout();
RSBrowser.setModal(true);hi,
with your problem statement it seems you should use javax.swing.JScrollPane like the one below
JScrollPane tableScroller = new JScrollPane(yourTable);
tableScroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
tableScroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);hope this helps you,
regards,
Afroze. -
Hi
It might seem a bit strange but still i would go on and ask.
Actually I am trying to use
<textarea rows="20" cols="20">xyzasfg</textarea>
in my Blog.
I thought this tag would put the code enclosed inside it in a textarea.
But nothing of the sort is happening.
Check the following Blog for the code snippets in textarea. i want something similar
/people/prakash.singh4/blog/2005/08/05/useful-undocumented-javascript-code-for-portal
Kindly suggest what needs to be done.
Thanks and Regards
AvinashHi Avinash,
See above the text area in blog drafting page. You will find an html button.
On clicking it u will see the html version of your blog.
You have to enclose your code there in the textarea dag.
This will give the desired format.
I hope it helps.
Regards,
Sumit -
ActionScript file using TextArea component
I have been developing applications in Flash CS5, but I coudn't stand the completely useless code editor any more, so I have installed the Flash Builder instead.
The problem I'm having now, is that I have an AS3 class that uses the TextArea component. But if I make an ActionScript project, I cannot import the TextArea class as FB doesn't seem to know about it. And I know nothing about Flex, so if I make a Flex project, I have no idea of how to combine my AS3 class with the TextArea component.
I am amazed - I thought that would be ridiculously simple, but I have been browsing Adobes sites for days now, and I'm not an inch closer to any solution.
Anyone knows something to help me?Thank you Anirudh,
I have been using the TextArea component because it has code to handle scrollbars, and in Flash this component is a wrapper for a TextField object. As far as I can see this is not the case in Flex, and my AS3 code sets almost all of the TextField attributes, so I probably can't use Flex and the Flash Builder anyway. At least not without throwing all my code away.
Besides, the .swf file generated seems to be much bigger than in Flash. -
Textarea scrollbar does not appear!!
Hi,
I've been working on this for some time now, and have been unable to get the scrollbar to appear when the text exceeds the viewable area.
There is a JTextArea and a JButton on one panel, which gets added to the SOUTH of a BorderLayout.
Hopefully someone can spot what I'm missing.
typePanel = new JPanel(gbl);
typeArea = new JTextArea();
typeArea.setBackground(grayBG);
typeArea.setLineWrap(true);
typeArea.setWrapStyleWord(true);
typeArea.setPreferredSize(new Dimension(width-35,35));
typeScrollPane = new JScrollPane(typeArea);
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = GridBagConstraints.RELATIVE;
typePanel.add(typeScrollPane, gbc);
sendButton = new JButton("Send");
//sendButton.setSize(5,5);
sendButton.addActionListener(sendListener);
JPanel send = new JPanel(gbl);
send.setPreferredSize(new Dimension(85, 35));
send.setBackground(grayBG);
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc);
gbc.fill = GridBagConstraints.NONE;
send.add(sendButton, gbc);
gbc.weighty = 0.0;
gbc.weightx = 0.0;
gbc.fill = GridBagConstraints.NONE;
typePanel.add(send, gbc);I had both the components on the same panel (typePanel). I tried adding them both to a panel of their own and then adding the two panels to typePanel - no difference.
I need to use GridBagLayout since it handles resize operations well. The textarea needs to expand to fill available space incase of a resize while the button size has to be fixed.
Thanks,
DewangHmm...
the default policy for the vertical scrollbar is VERTICAL_SCROLLBAR_AS_NEEDED, it should show up if the text is larger than the viewport.
Try setting the vertical scrollbar policy to VERTICAL_SCROLLBAR_ALWAYS with
yourJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
just for testing purpose - if the text fits in the viewport, you will see a vertical scrollbar without a track - check, if a track appears when you append the text so, that it does no longer fit in the viewport.
Perhaps this will give you an idea, what is going wrong with it.
greetings Marsian -
Has anyone encountered this issue with the TextArea component
where by clicking the up arrow first, the text becomes selected and
jumps to the maximum vertical position?
It only happens when the movie is first loaded, and only if
the user releases the up arrow on the scrollbar prior to using the
other buttons on the scrollbar.
An example occurs here, where this gentleman has a workaround
to a similar issue regarding TextAreas
http://oddhammer.com/index.php/site/comments/textarea_scroll_jumping/
Any help would be really appreciated,
thanks,
davePlease use code tags,
and when you post the code make sure that it is easily readable
as jsp can get confusing and hard to read.
try this
<textarea rows="10" cols="25" id="txtdescription" name="txtdescription" class="admin-selectbox" onKeyPress="limitText(this,249)">
<%
out.print(desc);
%>
</textarea> -
HTML Frames not using custom scrollbar in Flex 3 mx:HTML
I've been working on an app that uses a custom skin in Flex 3. The app has a help window. The help contains an HTML with frames. Problem is, the main app vertical scrollbar custom skin is being ignored for the HTML Frames scrollbar (what looks like the classic version of Halo - maybe). This only happens with frames. It happens no matter how or where I place my HTML or HTMLLoader. If I dont have frames the custom scrollbar is used. Is there a node im missing in my skin css (obviously not VScrollBar or ScrollBar - the two standard used by Flex)? or some other way to connect the HTML Frames scrollbar to my custom skin.
I'm not a noob but not an expert.
Thanks.
See attached image for example.Take the code of the jsp file :
<%@ page language="java" %>
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title> First Struts Application </title>
</head>
<body>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr bgcolor="#36566E">
<td height="68" width="48%">
<div align="left">
<img src="images/hht.gif" width="220" height="74">
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<html:form action="Lookup"
name="lookupForm"
type="wiley.LookupForm" >
<table width="45%" border="0">
<tr>
<td>Symbol:</td>
<td><html:text property="symbol" /> </td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit/> </td>
</tr>
</table>
</html:form>
</body>
</html> -
Applet repainting error in IE 5.5 using the scrollbars
I've created a real straight forward applet using swing components to test out this error. It consists of a couple of JButtons & JLabels added to a JPanel that's the JPanel is added to the ContentPane. I'm using the Java Plug-in 1.3 on a Windows 2000 box using IE 5.5. When I view my applet everything is just fine. But when I'm using the browser scrollbars to view the rest of my applet and try to scroll down, the applet controls and everything within the applet does not get repainted properly onto the screen. Everything in the applet gets painted on top of their old controls a couple of pixels off making it impossible to use. When I scroll to the bottom and top of the page the applet repaints just fine, but it's when I'm scrolling in the middle of the page is where the applet can not repaint properly. I have tested this in Netscape 6.0 and everything works just fine. I'mnot sure what could be causing this but maybe one of you have cameacross this problem before and could help out.
thanks,
Peter Landis.Here's the code:
import java.awt.*;
import javax.swing.*;
public class TestRepaint extends JApplet
public void init()
Container contentPane = getContentPane();
JPanel panel = new JPanel();
panel.setBackground(Color.lightGray);
controls(panel);
// Grid
contentPane.add(panel);
public void controls(JPanel p)
JLabel imagelabel = new JLabel();
JLabel imagelabel2 = new JLabel();
// Create some labels
JLabel label_1 = new JLabel("TEST 1");
JLabel label_2 = new JLabel("TEST 2");
JLabel label_3 = new JLabel("TEST 3");
JLabel label_4 = new JLabel("TEST 4");
JLabel label_5 = new JLabel("TEST 5");
JLabel label_6 = new JLabel("TEST 6");
JLabel label_7 = new JLabel("TEST 7");
setLabelControl(label_1);
setLabelControl(label_2);
setLabelControl(label_3);
setLabelControl(label_4);
setLabelControl(label_5);
setLabelControl(label_6);
setLabelControl(label_7);
// Buttons
JButton b1 = new JButton("Button 1");
JButton b2 = new JButton("Button 2");
JButton b3 = new JButton("Button 3");
JButton b4 = new JButton("Button 4");
JButton b5 = new JButton("Button 5");
JButton b6 = new JButton("Button 6");
JButton b7 = new JButton("Button 7");
setButtonControl(b1);
setButtonControl(b2);
setButtonControl(b3);
setButtonControl(b4);
setButtonControl(b5);
setButtonControl(b6);
setButtonControl(b7);
// Layout
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
p.setLayout(gridbag);
c.anchor = GridBagConstraints.WEST;
c.fill = GridBagConstraints.BOTH;
c.weightx = 1.0;
c.gridwidth = 1;
// Note Inset is (Top, Left, Bottom, Right);
c.insets = new Insets(0,5,20,0);
p.add(label_3,c);
c.insets = new Insets(0,5,20,1);
p.add(b3,c);
c.insets = new Insets(0,5,20,0);
p.add(label_4,c);
c.gridwidth = GridBagConstraints.REMAINDER;
c.insets = new Insets(0,5,20,1);
p.add(b4,c);
c.gridwidth = 1;
c.insets = new Insets(0,5,20,0);
p.add(label_5,c);
c.insets = new Insets(0,5,20,1);
p.add(b5,c);
c.insets = new Insets(0,5,20,0);
p.add(label_6,c);
c.gridwidth = GridBagConstraints.REMAINDER;
c.insets = new Insets(0,5,20,1);
p.add(b6,c);
public void setButtonControl(JButton button)
button.setBackground(Color.white);
void setLabelControl(JLabel l)
l.setFont(new Font("Helvetica", Font.BOLD, 14) );
l.setForeground(Color.black);
||||||||||||||||||||| HTML CODE |||||||||||||||||||
<title>Test</title>
<hr>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.3 -->
<SCRIPT LANGUAGE="JavaScript"><!--
var info = navigator.userAgent; var ns = false;
var ie = (info.indexOf("MSIE") > 0 && info.indexOf("Win") > 0 && info.indexOf("Windows 3.1") < 0);
//--></SCRIPT>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
var ns = (navigator.appName.indexOf("Netscape") >= 0 && ((info.indexOf("Win") > 0 && info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
//--></SCRIPT></COMMENT>
<SCRIPT LANGUAGE="JavaScript"><!--
if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 500 HEIGHT = 425 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"><NOEMBED><XMP>');
else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.3" CODE = "TestRepaint.class" WIDTH = 500 HEIGHT = 425 scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED><XMP>');
//--></SCRIPT>
<APPLET CODE = "TestRepaint.class" WIDTH = 500 HEIGHT = 425></XMP>
<PARAM NAME = CODE VALUE = "TestRepaint.class" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
</APPLET>
</NOEMBED></EMBED></OBJECT>
<!--
<APPLET CODE = "TestRepaint.class" WIDTH = 500 HEIGHT = 425>
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
<hr> -
hi guys
iam developing a custom form using forms 6i
this is my prob i have a content canvas and a tab canvas in my window i have abt 20 col in my one of tab and i want to use a scroll bar in the tab how can i use that option can any one help me urgentYou can try to use the stacked canvas into your tab canvas.
In this way you can use the vertical scrollbar to go through your records and the horizontal scrollbar to view all the columns.
Hope it helps you,
Fabrizio -
How to use TextArea in Forms9i
hello all,
i'm new to this forum, i've worked in forms3 but now working on forms9i, my problem is with regard to Textarea in my form, my form has other text fields, but want a textarea, for storing data upto 4000 charachters in Varchar2 in my table, for reuse.
please help !!You have not specified your problem....
If you want to use a textarea in your form , you can add a text item and set:
*multi-line -> yes
*maximum-length -> 4000
"...for reuse"
If you want the above properties to be reusable... you can declare a propery class.
Read the on-line doc....of your forms version.
Anyway , you should specify your 'problem'
Greetings,
Sim -
Automatic scrolling using textareas.
My application has a jscrollpane with several components being dynamically created. It adds jtextareas just fine, however, when it populates the jtextareas with text, it scrolls down to the last text area. My users do not want this. How can I get around the auto-scrolling when the jtextareas use the setText( ) method?
I did some fiddling with this about a year ago. I don't remember the details, but according to some leftover code something like this might do the trick:
Document d = textarea.getDocument();
try {
d.insertString(d.getLength(), s, null);
} catch (BadLocationException ble) {
//Shouldn't happen when getLenght() is used for index.
//If it happens anyway, write a stacktrace and
//otherwise ignore it.
ble.printStackTrace();
}If this does not work, you should something like this: (very rough and untested. Read the API for details.)
int currentPosition = scrollpane.getVerticalScrollbar().getPosition();
// ... do the adding ...
scrollpane.getVerticalScrollbar().setPosition(currentPosition);
Maybe you are looking for
-
How do I bookmark ALL tabs at one time?
Firefox 3 allow all tabs to be bookmarked at one time. Please let me know how to do this with version 4. Thanks!
-
Issue with date of entry and date of posting in F110
Hello, When we do a payment run (transaction f110) and we do the validation, the entry of all payments is made at the date of the proposal even if the validation is made a few days later. How can we do to have this entry at the date of the validation
-
Dnscmd's OpenAcl option doesn't seem to change DNS record permissions
I'm creating DNS A records with dnscmd /recordadd, and I can't see a difference in the A record's permissions whether I use the OpenAcl option or not. Is this normal? I was expecting with OpenAcl to see permissions similar to Write permissions for Au
-
How can I repair broken raw files after restoring a PSE 11 catalog to a new PC?
I recently purchased a new PC so a performed a Catalog Backup on the old PC and then restored it on the new PC. All the files are there, however, all of the RAW files are not accessible. They show up in the catalog with the broken file icon and can
-
I want to do a clean reinstall of itunes...
If I uninstall itunes, delete all of the folders and reset my ipod to factory settings, can I reinstall it and redownload the music and movies I've purchased? I don't want to lose all my Battlestar Galactica, Chappelle and Heros Thanks!