JTextArea question(setting a large text)

Hi,
I watched a kind of problem using the
JTextArea.apped(String string);I read a long file(>2MB) into a byte[] create a String with this array and try to append
this long string with the append method into the text area.
The problem now is, that the app freezes...
If I append only a substring of a smaller size(maybe 200 chars) everything works fine.
Anyone have recongnized the same behavior? The method
JTextArea.setText(String s);don't work too.
Olek

I read a long file(>2MB) into a byte[] create a String with this arraySo you have a copy of the file:
a) in a byte array
b) in a String
c) in the Document of the text area
So you have 3 copies of the file in memory. Not very efficient.
Use the read(...) method of the text area to load the data directly into the Document.

Similar Messages

  • Large text

    First of all i apologise if this is in then wrong section but i wondered if there is anywhere that i can set a large text so when i go into things like email ebay etc the text is large without me using the command key
    looking forward to your answers
    eon

    Peter,
    Yes, a poor term, I guess. The only difference I notice upon changing the font size in the Safari preference is, for example, the relative font size of text I compose in Yahoo mail vs. the size of the fonts used in the rest of the Yahoo mail window. Changing the Preference font and reloading a typical web page doesn't seem to change anything here. On the other hand, the zoom in/out control changes everything, and to the point of the original post, there doesn't seem to be a preference for the default zoom. What am I missing?
    Update: After more experimentation, no change in displayed font on these discussions with preference change either, but with a Google page, instant change in most of the fonts on the page. So I'm beginning to get it, but the effect seems inconsistent.
    Jerry
    Message was edited by: Jerrold Green1

  • How do you set mozilla firefox with large text?

    When I try to customize my page I only see medium text. I need large text.

    Hello,
    In Firefox, :
    #tap on the three bar menu at the top right of the screen
    #tap settings
    #tap display
    #tap text size
    In there, tap on the bigger "a" to make the text bigger in Firefox, as in the example above it.

  • Arbitrary waveform generation from large text file

    Hello,
    I'm trying to use a PXI 6733 card hooked up to a BNC 2110 in a PXI 1031-DC chassis to output arbitrary waveforms at a sample rate of 100kS/s.  The types of waveforms I want to generate are generally going to be sine waves of frequencies less than 10 kHz, but they need to be very high quality signals, hence the high sample rate.  Eventually, we would like to go up to as high as 200 kS/s, but for right now we just want to get it to work at the lower rate. 
    Someone in the department has already created for me large text files > 1GB  with (9) columns of numbers representing the output voltages for the channels(there will be 6 channels outputting sine waves, 3 other channels with a periodic DC voltage.   The reason for the large file is that we want a continuous signal for around 30 minutes to allow for equipment testing and configuration while the signals are being generated. 
    I'm supposed to use this file to generate the output voltages on the 6733 card, but I keep getting numerous errors and I've been unable to get something that works. The code, as written, currently generates an error code 200290 immediately after the buffered data is output from the card.  Nothing ever seems to get enqued or dequed, and although I've read the Labview help on buffers, I'm still very confused about their operation so I'm not even sure if the buffer is working properly.  I was hoping some of you could look at my code, and give me some suggestions(or sample code too!) for the best way to achieve this goal.
    Thanks a lot,
    Chris(new Labview user)

    Chris:
    For context, I've pasted in the "explain error" output from LabVIEW to refer to while we work on this. More after the code...
    Error -200290 occurred at an unidentified location
    Possible reason(s):
    The generation has stopped to prevent the regeneration of old samples. Your application was unable to write samples to the background buffer fast enough to prevent old samples from being regenerated.
    To avoid this error, you can do any of the following:
    1. Increase the size of the background buffer by configuring the buffer.
    2. Increase the number of samples you write each time you invoke a write operation.
    3. Write samples more often.
    4. Reduce the sample rate.
    5. Change the data transfer mechanism from interrupts to DMA if your device supports DMA.
    6. Reduce the number of applications your computer is executing concurrently.
    In addition, if you do not need to write every sample that is generated, you can configure the regeneration mode to allow regeneration, and then use the Position and Offset attributes to write the desired samples.
    By default, the analog output on the device does what is called regeneration. Basically, if we're outputting a repeating waveform, we can simply fill the buffer once and the DAQ device will reuse the samples, reducing load on the system. What appears to be happening is that the VI can't read samples out from the file fast enough to keep up with the DAQ card. The DAQ card is set to NOT allow regeneration, so once it empties the buffer, it stops the task since there aren't any new samples available yet.
    If we go through the options, we have a few things we can try:
    1. Increase background buffer size.
    I don't think this is the best option. Our issue is with filling the buffer, and this requires more advanced configuration.
    2. Increase the number of samples written.
    This may be a better option. If we increase how many samples we commit to the buffer, we can increase the minimum time between writes in the consumer loop.
    3. Write samples more often.
    This probably isn't as feasible. If anything, you should probably have a short "Wait" function in the consumer loop where the DAQmx write is occurring, just to regulate loop timing and give the CPU some breathing space.
    4. Reduce the sample rate.
    Definitely not a feasible option for your application, so we'll just skip that one.
    5. Use DMA instead of interrupts.
    I'm 99.99999999% sure you're already using DMA, so we'll skip this one also.
    6. Reduce the number of concurrent apps on the PC.
    This is to make sure that the CPU time required to maintain good loop rates isn't being taken by, say, an antivirus scanner or something. Generally, if you don't have anything major running other than LabVIEW, you should be fine.
    I think our best bet is to increase the "Samples to Write" quantity (to increase the minimum loop period), and possibly to delay the DAQmx Start Task and consumer loop until the producer loop has had a chance to build the queue up a little. That should reduce the chance that the DAQmx task will empty the system buffer and ensure that we can prime the queue with a large quantity of samples. The consumer loop will wait for elements to become available in the queue, so I have a feeling that the file read may be what is slowing the program down. Once the queue empties, we'll see the DAQmx error surface again. The only real solution is to load the file to memory farther ahead of time.
    Hope that helps!
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • I'm trying to set up the iPad for a person with limited vision.  Is there a setting to keep text, especially in iBooks, from exceeding the width of the screen when zooming?

    A

    This is from the iPad User Guide:
    Change a book’s appearance: Some books let you change the type size, font, and page color.
    Change the font or type size: Tap near the center of a page to display the controls, then tap . Tap Fonts to select a typeface. Some books allow you to change the type size only when iPad is in portrait orientation.
    Change the color of the page and text: Tap near the center of the page to display the controls, tap , then tap Theme. This setting applies to all books that support it.
    Change the brightness: Tap near the center of a page to display the controls, then tap . If you don’t see , tap first.
    Turn justification and hyphenation on or off: Go to Settings > iBooks. PDFs and some books can’t be justified or hyphenated.
    (Sorry about the numbers above that were automatically inserted.)
    Of course, there's also Settings > General > Accessibility for general large text settings for your iPad.

  • How do I set the default text in a bound textbox?

    How do I set the default value of a bound textbox when the AddNewItem button on the MenuStrip is clicked?
     I have the following code (see below), but for some reason it does work when I put the code in the
    AddNewItem_Click event; however, it does work if I put it in the
    Form's Load Event. The statement in question is Me.txtBusUsagePct.Text = 100.
    What am I doing wrong? Why can't I set the default text in the AddNewItem_Click
    event?
       Private Sub BindingNavigatorAddNewItem_Click(sender As Object, e As EventArgs) Handles BindingNavigatorAddNewItem.Click
    Me.txtBusUsagePct.Text = "100"
       End Sub
    BobV365

    Hello,
    Here I am using mocked up data but the important thing is after loading the data. Requires on the form a BindingNavigator and two text boxes.
    Public Class Form1
    WithEvents bsData As New BindingSource
    Private Sub Form1_Load(
    ByVal sender As System.Object,
    ByVal e As System.EventArgs) Handles MyBase.Load
    Using MockedData As New DataTable()
    MockedData.Columns.AddRange(New DataColumn() _
    New DataColumn("PartName", GetType(String)),
    New DataColumn("partqty", GetType(Int32))
    MockedData.Rows.Add(New Object() {"Part A", 100})
    MockedData.Rows.Add(New Object() {"Part 99", 34})
    MockedData.Rows.Add(New Object() {"Part B", 4})
    bsData.DataSource = MockedData
    End Using
    CType(bsData.DataSource, DataTable).AcceptChanges()
    BindingNavigator1.BindingSource = bsData
    TextBox1.DataBindings.Add("Text", bsData, "Partname")
    TextBox2.DataBindings.Add("Text", bsData, "partqty")
    End Sub
    Private Sub bsData_AddingNew(
    ByVal sender As Object,
    ByVal e As System.ComponentModel.AddingNewEventArgs) _
    Handles bsData.AddingNew
    Dim dv As DataView = TryCast(bsData.List, DataView)
    Dim rv As DataRowView = dv.AddNew()
    rv("PartName") = "(new)"
    rv("partqty") = 0
    e.NewObject = rv
    bsData.MoveLast()
    End Sub
    End Class
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile
    but do not reply to forum questions.

  • SQL Developer paste problem for large text in Linux

    Hello,
    I have a problem. I cannot paste large text (> 5000 lines) into the editor of a clob column. Pasting in general works. I mean I can paste the whole content e.g. to gedit or I can paste partially the text into the sql developer editor but not as a whole.
    Colleagues on a Mac can paste the text into the editor. So it should not be about DB settings.
    Can anyone tell me which setting I have to change? 
    SPECS:
    Ubuntu 13.10
    java version "1.7.0_25"
    OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4ubuntu3)
    OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
    Info
    Oracle SQL Developer 3.2.20.09
    Version 3.2.20.09
    Build MAIN-09.87
    Copyright © 2005, 2012 Oracle. All Rights Reserved. Alle Rechte vorbehalten.
    IDE Version: 11.1.1.4.37.59.48
    Product ID: oracle.sqldeveloper
    Product Version: 11.2.0.09.87
    Version
    Komponente    Version
    ==========    =======
    Java(TM)-Plattform    1.7.0_25
    Oracle-IDE    3.2.20.09.87
    Versionierungsunterstützung    3.2.20.09.87

    I've the same problem and posted it under: 'SQL Dev 2.1 RC1 - "scan defines" doesn't work in opened *.sql files '
    I seems, that it doesn't work now, though it worked in SQLDEV 1.5.5
    @Chris

  • Scrollable TextBox with large text

    Hi
    I am using a TextBox in my windows phone silverlight app. My requirement is to put a really large text in that textbox. in that case I want that to be scrollable. So I have put that in a ScrollViewer. But my text is clipped after a particular level.
    Please help me.
    Thanks in advance.

    Hi rkarti,
    In my mind, it may be caused by the TextBox.MaxLength Property.
    If the user pastes text or enters text using the keyboard into the textbox that causes the number of characters to exceed
    MaxLength, then the last characters in the textbox are deleted.
    For more information, please try to refer to this article:
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.textbox.maxlength(v=vs.95).aspx .
    So if you have used this TextBox.MaxLength Property, please try to set it to a larger value.
    If the above information can not solve your problem, please try to post your code in here.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Certain web pages are stuck in large text in Safari

    I've been having this issue since I got my Air last year.  Certain web pages (MSNBC and Google to name a few) are stuck in really large text.  Other web pages are fine.   I've tried resetting th browser, deleting cookies, etc.  But I cannot seem to fix this issue.  Anyone have any ideas?
    Thanks

    Sorry.  I poked around furhter and finally found the issue.  The font sizes were too big!  Not sure when I could have done that, but there you go.  This question can be closed down.

  • How can I set the caption text of picture controls inside an array or how can I choose which array element is assigned using the array elements caption text property.

    I have 8 picture controls inside an array and I would like to set the caption text of these controls.
    I have used the property node of the array and used the array elements property caption text to set the text.
    The problem is however that I set the same text to all the picture controls inside the array.
    My question is how to set caption text of specific elements (Picture control) that I have so far only been able to access using the array elements caption text property.

    Some more help
    1 You could use the caption of the array and place it in front of the selected picture and update that using property nodes.
    2 Like Norbett said if you use a cluster of pictures then their caption can be updated individually.
    Here is a an example that demonstrates the above
    David
    Attachments:
    Modify the Captions Of Pictures.vi ‏83 KB

  • How to set Tool Tip Text to Tree Node?

    Hi,
    How to set Tool Tip Text to Tree Node in JTree?
    Pls somebody help me to solve it.

    bsampeieri,
    Been here a long time myself. I don't agree with the one post is enough per se. That is to say, sometimes, it helps to post in several groups so that more eyes may see it. A number of forum posters linger in specific forum topics and may not see the post in another forum.
    Now, if in the previous post you/others answered the question and then the OP posted here later, I could see the complaint.
    For the OP, the better way to cross-post is to have one "main" post, then have all the other posts refer back to that one (link to it) so that people aren't duplicating the effort to answer your question(s). A simple "I have cross-posted this to get more eyes on it. Please reply to this question at this post <link here>"

  • My large text at 32pt font doesn't affect all of my emails, why?

    In his iPhone Settings, under Accessibility, my boss has his Large Text set at 32pt font. However, about half of his work emails come through in the large font, and half do not (they come through in 5pt font, it's really small). The email is an Microsoft Exchange email, and I've had my fair share of problems working on an iPhone with an Exchange account, but this seems odd as there doesn't seem to be a reason why some emails come through in 32pt font, and other's don't. I don't know if it has anything to do with the length of the chain of the email, like 40 email responses come through small whereas an email chain of 5 responses comes through in 32pt. AppleCare had no idea, and did some troubleshooting (e.g. rebooting and try to reset all preferences) which didn't work. Help please!

    No, only outbound emails are HTML. Inbound emails are sent in their original format, whether that's RTF or Plain Text. So is that the problem then? Emails that are sent, lets say, Plain Text where it doesn't support italics, bold, or other text formatting? Although, it seems that many of the emails that aren't affected by his iPhone setting of 32pt text seem to come through in either RTF or HTML, as most of these inbound (external) emails are also coming from Outlook 2010.

  • Mouse doesn't click what's onscreen in Windows 7 Large Text format

    This is an odd issue we've discovered. We are using Windows 7 Enterprise, and a few of my coworkers have changed screen resolution to LARGE text (Right click desktop > Screen Resolution > Make text and other items larger or smaller > Larger - 150% > Apply). When they do this and attempt to use InDesign CS5.5 (7.5.1), their mouse is essentially useless within InDesign. When they click on something within the application, it either doesn't respond at all or does something different. What we've deduced is that it's showing a visual-only larger version of the interface, but the mouse itself is still clicking through a smaller text version of the application that our eyes cannot see. This only occurs with InDesign - not Illustrator or Photoshop.
    Has anybody come across this, and if so, any workarounds?

    Thanks, Peter. I did check the Adobe page for known bugs and either glossed over this one or it wasn't there. In any case, setting Windows 7 to operate 'Best for performance' turned off all the bells & whistles and now InDesign works fine. It tested the individual settings and it turns out that selecting 'Use visual styles on windows and buttons' is what makes things wonky. Thanks for the tip!

  • My IPhone 5 is set on keep,text forever but I can only go back to mid August how do I access the rest of my text?"

    why can I not access all my text when my setting is 'keep text forever' I can only get text upto August?

    Hey staceypryz,
    Thanks for the question. I understand that your iPhone is unexpectedly restarting and displaying only the Apple logo. For this issue, it may be best if you contact Apple Support, as recommended in this resource:
    iOS: Device unexpectedly restarts, displays Apple logo, or powers off
    http://support.apple.com/kb/TS5356
    Resolution
    Make sure your iOS device is up to date. If you still see this issue after updating, contact Apple Support.
    Learn what to do if your iOS device won't start up past Apple logo or doesn't respond.
    Thanks,
    Matt M.

  • BW Web Report Issue - Result set too large

    Hi,
    When I execute a BEx Query on Web I am getting “Result set too large ; data retrieval restricted by configuration (maximum = 500000 cells)”.
    Following to my search in SDN I understood we can remove this restriction either across the BW system globally or for a specific query at WAD template.
    In my 7x Web template I am trying to increase default max no of rows parameters, As per the below inputs from SAP Note: 1127156.
    But I can’t find parameter “Size Restriction for Result Sets” for any of the web items (Analysis/Web Template properties/Data Provider properties)….in the WAD Web template
    Please advise where/how can I locate the properites
    Instructions provided in SAP Note…
    The following steps describe how to change the "safety belt" for Query Views:
    1. Use the context menu Properties / Data Provider in a BEx Web Application to maintain the "safety belt" for a Query View.
    2. Choose the register "Size Restriction for Result Sets".
    3. Choose an entry from the dropdown box to specify the maximum number of cells for the result set.
                  The following values are available:
    o Maximum Number
    o Default Number
    o Custom-Defined Number
                  Behind "Maximum Number" and "Default Number" you can find the current numbers defined in the customizing table RSADMIN (see below).
    4. Save the Query View and use it in another Web Template.
    Thanks in advance

    Hi Yasemin,
    Thanks for all help...i was off couple of days.
    To activate it I can suggest to create a dummy template, add your query in it, add a menu bar component add an action to save the query view. Then you run the template and change the size restriction for result set then you can save it by the menu.
    Can you please elaborate on the solution provided,I created dummy template with analysis and Menu bar item...i couldn't able to configure menu bar item...
    Thanks in advance

Maybe you are looking for

  • Help! Can't play online videos in Adobe Flash CS3/ CS4.

    Hi everyone, I am not able to play online videos in Adobe Flash CS3/ CS4. Reinstalled, changed computer, the same. But I could play just a month ago. Any idea what could have happened to my Adobe Flash CS3/ computer  or any other source please? Many

  • How to set default for "Horizontal / Vertical Alignment"?

    Hi, is there somewhere a setting to change the default of the "Horizontal / Vertical Alignment" property for an item label? I don't like the "Right" alignment and I have to change it each time when I create a new item. Thanks Patrick http://inside-ap

  • How do I delete default genres in iTunes 11.3?

    It used to be a case of editing the localized.strings file, but this no longer works. Anyone know where the list of default genres can be found now?

  • Hardware requirement for mapbox installation

    Hi, We would like to install mapbox component on a separate server for groupware integration between CRM 5.0 and Lotus Domino 7.02 Our SAP CRM runs on AS 400 db (E-series system I), would like to know if we have to go with AS 400 server for mapbox to

  • Random screen flash- 15" MBP (late 2008)

    Just purchased a new Macbook Pro in November 2008 (Aluminum) and have recently noticed a random screen flash on the native display. It happens at inexplicable times; 1) low CPU,Mem,Disk usage, low temp (under 130 degrees F), 2) High CPU/Mem usage and