Help to deal with the =Long text(size in the level of Mega ) = in JTextArea

for general java application, memery is up to a limit memory size.
And long plain text in JTextArea will cause "java.lang.OutOfMemoryError"
May be I can use document in JTextArea. But it will be complicate,
Is there any more easy one to solve this problem?
Thanks in advance!

Or, you could try loading the text in segments instead of all of it into memory at once. This is a more user and computer friendly way since then you aren't hogging system resources.

Similar Messages

  • Who can help me deal with the question?

    My JSP platform is JDK1.3+RESIN1.1.5,whern i write these code ,i found something wrong!
    <%@ page contentType="text/html;charset=gb2312"%>
    <%@ page info="database handler"%>
    <%@ page import="java.lang.*"%>
    <%@ page import="java.awt.*"%>
    <%@ page import="com.caucho.sql.*"%>
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="javax.servlet.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%! String username;%>
    <%! String password;%>
    <%! String sql;%>
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:jsptest";
    Connection conn=DriverManager.getConnection(url,"sa","hulachen");
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
    String username=request.getParameter("username");
    String password=request.getParameter("password");
    sql="select * from tbl_accounts where username='"+username+"' and password='"+password+"'";
    ResultSet rs=stmt.executeQuery(sql);
    while (rs.next())
    String name=rs.getString("username");
    out.print(name);
    if (name==null)
    out.print("error");
    else
    out.print("welcome");
    %>
    whether the name is null or not ,it will print error,i don't know why,who can help me?Thanks!

    I did the same as you said,but the same thing happened!
    the code is:
    while (rs.next())
    String name=rs.getString("username");
    out.print(name);
    if (name==null)
    out.print("True");
    else
    out.print("False");
    If the name is null,it printed False,but if the name is nothing,it didn't print True,but nothing!

  • What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off., What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off.

    What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off., What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off.

    Trax and kirt are correct. I'm pretty good with technology, being an engineer and all, and I can tell you for a fact that this 'swoosh' sound (triggered by a successfully sent SMS) can NOT be disabled from ANY menu in iOS 5. The ONLY way to disable it is to flip the silent switch on the left hand side of the phone. This is extremely annoying for some people (like trax, kirt, and myself). For what we pay for Apple products and, in particular, this phone, we simply didn't expect to have to deal with such annoyances. That's why we're Mac users. Please fix this bug.
    I feel like I shouldn't have to say this but it bears repeating: turning off message sounds from the 'sounds' menu does not fix his problem. It still emits the swoosh noise. Whoever suggested this clearly didn't try it because it obviously doesn't work. Who posts a solution to a problem without knowing for a fact that their solution is correct? I find that response condescending because he writer is assuming we're not smart enough to have tried it. In reality, it's vice versa.

  • What's the deal with the video format?

    Hello! What is the deal with the video format? Does it mean I have to code the videos for 640*480 ? It won't accept any other size? What size do I need to select for widescreen format?
    With Quicktime pro I've been able to encode videos with a very nice resolution and small size, then try to synch them to the ipod touch and then the error, it can't be played. I use the .mov format, I like it more but if I have to use .mp4 then I'll use it.
    Thanks for the help!

    According to Apple's Specification, these are your video choices
    H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    http://support.apple.com/kb/SP496

  • My brand new Macbook PRO crashed completely after it went through the iOS 10.7.4 update, I lost everything and Apple just wants to replace the HD and let me deal with the hassle.

    Last Thursday May 10th I received a prompt from the Automatic Update to update the iOS to Ver. 10.7.4, set the start and was watching the progress when it stopped with an error message saying that it was not able to update, right below there was a buttom "RESTART", pressed the buttom and waited to re-boot.....That was the end of my computer, somehow the update crashed my HD beyond recover, it would only show the gray screen with Apple logo in the center and kept beeping, BEEP BEEP BEEP.....PAUSE.....BEEP BEEP BEEP.....PAUSE.....on and on and on and it never past that.
    Friday May 11 I took it to a retailer where I received the bad news that the HD was crashed and the teck couldn't even try to copy anything from it as it couldn't locate it. I checked iCloud on a hope that all my stuff would be there but new surprise, iCloud didn't kept all of my stuff as it was programmed to.
    Now here is the funny part, the tech from the retailer informed me that the only thing they could do was to order a new HD for my 4 months old Macbook and that the time to have my computer back will be at least 15 days, now that is the funny part, I fail to understand why do I have to suffer the hassle of loosing all my data plus wait at least 15th days to have my computer back (meanwhile loose work) on a problem caused by Apple, PROBLEM, not machine defect, clearly my computer had no problem untill I followed the procedure to update.
    On Saturday May 12 I contacted Local Apple Support (I have failed to mention that I live in Brasil) and they informed me that what the dealer said was the only thing that could be done, too bad for me if I lost everything, going to loose several days of work and whenever I receive my computer back will have to re-construct all my life and deal with the forever lost data.....DEAL WITH IT
    After a couple of discussion with Apple Support and the Dealer, I made my decision to take the Macbook to the dealer today for repair and meanwhile I'm opening a case with the Brazilian Justice to have Apple honor with all the trouble and hassle that it is causing me, it's said that I have to take this type of action as I'm a very fan of Apple and it's products, have had several iPods, iPhones, Macbooks, Keyboards, Mouses, Apple TV, etc.....This i the first time I have a problem with a Apple product and got a taste of the "Apple Care", it seems like Apple is more concerned on seeling products then keeping long time customers happy.
    One last thing, today when I was at the dealer to drop my computer for repair, the Technician informed me that he also had a computer crashed and the HD erase on Sunday May 13th in the same way of mine, after the update everything was gone, also he said that we were not the only ones, iPads and iPhones were going trough the same situation, update causing complete breakdown.
    WORD OF ADVISE, BE 1000% SURE THAT YOU HAVE EVRYTHING BACKED UP BEFORE YOU GO THROUGH AN UPDATE.

    rvalezin wrote:
    If I need to back-up every hour of my life in order to be able to save everything from something like this I won´t do anything else.....at least we should be able to trust that Apple tests this updates so situations like this won´t happen.
    That's exactly what Time Machine does for you.  It backs up every hour, so you don't have to.  While it is backing up, you keep on working.  Time Macvhine came with your Mac and you chose not to use it.
    The 10.7.4 update did not cause your hard disk to fail.  Hard disk fail due to mechanical causes.  They are extremely reliable, but that doesn't mean every hard disk will last a long time.  Your mileage WILL vary!
    If you are dependent on your computer and the data stored on it, then you should make sure you have AT LEAST two copies of all data and probably three or four.  You should use at least two means of backing up in case the backup software has a problem.  And you should consider having a backup computer if you live in an area where replacement takes too long (whatever too long is for your business).
    Apple hardware and software is very, very good.  You have documented your experience of this.  But NO hardware or software is perfect.  You also have experience of this.
    It is YOUR responsibility to ensure that your system is set up to protect your data and availability of computing resources.

  • How you deal with the situation if the vendor/supplier is also a customer ?

    Dear All,
    Could you please help me with the idea on how to deal with the suppliers/vendors who also are customers to you in MM?
    Thanks in advance,
    Ranjan

    It depends what you are intentions are..
    However
    1. Create a customer master record for that vendor that is also a customer.
    2. Enter Vendor number in Vendor field in control data-customer master record.
    3. Enter customer number in Customer field in Control data- vendor master record
    Finally, Check "Clrg with vend." field or "Clrg with cust." field

  • How to deal with the situation when the database change into ms-sqlserver ?

    Hi,dear all,
    How to deal with the situation when the database change into ms-sqlserver or other database?
    Now, i want to build a j2ee project with ORACLE ADF bc,but this project may be used in several diffrent databases for example oracle db,ms db,mysql and so on.however,if i have developer this project in jdeveloper and this project connection was config as a oracle database,and then,can this project be reused for other databases espasially including the model codes? if yes,how should i do?
    all who know how to resolve this,tell me pls,thanks.
    bruce Li,
    China
    Message was edited by:
    user526724

    Hi Paulbin,
    Do you want to supply a function-pointer to a DLL so it can call[back] your VI?  Here's how it can be done with .NET, though, that solution requires a C compiler.   A single "VI_to_function-reference" utility could handle all cases where the callback passes no parameters.  Maybe someday somebody will share that dll.
    Did you know that LabVIEW can use Events for some COM-signals change?  See pic.  (Note: DTR is not listed - - )
    Another question is another function's prototype is WORD SetTestType(WORD comHandle, bool type1, bool type2, bool type3),   I tried to use a boolean control and a Boolean to (0,1) node in labVIEW to pass parameters to CLF, I config the bool input value as U8(according to C++ bool type) and U32(according to WIN32 BOOL type), it dose not help, when I execute the VI, LabVIEW will be disappeare, it seems to be closed, I must start it again.
    Could someone has similar experience on this points?
    It's easy to crash LabVIEW misusing CLF - maybe there's another reason for the crash besides bool mis-match(?)  Do you know which "Calling convention" is required?  What type is comHandle? (where does comHandle come from?) 
    Cheers!
    Message Edited by tbd on 03-23-2007 09:34 PM
    Message Edited by tbd on 03-23-2007 09:35 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    evt.jpg ‏7 KB

  • My apple account is disabled, please help me deal with as soon as possible!

    My apple account is disabled, please help me deal with as soon as possible!

    Change the password, but did not receive the letter to change the password

  • Proactively dealing with the heat.

    Many user's of the new macbook's and macbook pro's are recognizing the high heat issues of these machines. Some however report of having no significant heat experience at all. I do not see any reason why some macbook's who get uncomfortably hot and some wouldn't. Is it possible that some user's w/o complaints simply haven't used thier computer for long enough periods to establish a significant heat level? Most people don't even use a computer for longer than an hour or so,. Personally, my macbook gets a little warm. But this is only after an hour or so. During the first hour, following a long rest/sleep, the heat is fine. After that I must say that it gets a little warm on my lap, enough for me to shift it around every once and a while. But it really doesn't bother me that much. But the key word here. "ME."
    I venture to say this:
    All macbook's and macbook pro's and quite possibly all notebook's will get hot to uncomfortable point if used for a long enough period. However, since the description "uncomfortable" is entirely subjective, we will get:
    1. More extreme reports from user's with very sensitive skin.
    2. Mild or no report at all from user's not sensitive enough for the warmth to get to them.
    3. Report's of no heat problems whatsoever from user's who do not use thier computer's for long enough periods, or long enough sitting's to warrant the upper heat levels (by far, the vast majority of user's will be in this category and you will never hear a word from them. If you do, it will be very positive, which is entirely O.K. and honest and absolutely understandable, albeit perhaps a bit misleading to a different user.)
    4. Report's of no heat from user's who, in the much understandable excitement of having just recieved the macbook, have prematurely posted a no heat experience without even having used thier machine long enough.
    Personally, I fall under the #2 group. If the heat begin's to bother me I just shift the computer a little bit or put it on the table instead. I, out of what I would call common sense, never expected that a notebook would not be hot.
    Notebook's are going to get hot. Cram all that power into such a small area and heat will certainly be produced. Now one can argue for the reasons why but one can also not escape the fact that pretty much all laptop and notebook computer's get very warm after extended use periods or processor heavy periods. With the current technology there is not a way to remove this issue.
    All this being said, we must discover ways of minimizing that heat if we should want to use our notebooks indeed as "laptops." I am open to dealing with the heat issue and am open to any advice any of you can offer to minimize this inherent issue. Those of us who are bothered by the heat level and have found or know of ways of reducing it should speak. Does anyone care to start?
    (DO NOT POST TO TELL ME THAT YOU HAVE NO HEAT PROBLEMS. THE HEAT PROBLEMS ARE NOT BAD. THEY ARE JUST THERE. WETHER OR NOT YOU DEFINE IT AS A PROBLEM DEPENDS ENTIRE UPON YOU AND YOUR PERSONAL EXPERIECE. I WANT ONLY TO DEAL WITH THEM HERE.)

    A simple visit to an Apple store (if geographically possible) will show that your model, the 1.83ghz MacBook, appears to be the coolest to the touch along the bottom and topsides, of all models. Oddly, in one of the stores we visited (of 3), the temperature varied among the same configurations. ie. Black MacBooks along side one another, where one was much, much warmer than the other, confirmed by store members and personnel. A 17" MacBook Pro was the coolest to the touch, but possibly because the larger surface area of the shell made for a greater radiator or heat sink, if you will.
    We have 2 MacBooks, an iMacIntel Duo 20", and a venerable 17" G4 Powerbook. The heat generated varies remarkably on the Intel processors depending on configuration of memory, usage, climate and the programs running.
    Now if the Macbooks only had a backlit keyboard, then it would be nearly perfect for those night time living room surfing in the dark evenings at our house.
    Black MacBook (2), iMac Duo 20", Powerbook 17" etc Mac OS X (10.4.6) Stock configuration

  • Need help from somebody with the "MSI KT6 Delta-FIS2R" motherboard

    Hi everybody!
    I really need some help from somebody with the MSI KT6 Delta-FIS2R motherboard (the one with onboard LAN, Audio, RAID, S-ATA and IEEE1394 firewire). You see. I've got this board myself but it's been destroyd. Some values for the onboard devices in my board has been overwritten so that windows no longer recognizes the onboard LAN and Audio controller anymore. I really need some help from somebody with this board.
    I need to see what the values for the onboard devices should be. I hope someone can help me by sending me a repport from the Everest home edition: http://www.lavalys.com/products/overview.php?pid=1&lang=en
    If anyone could do me this favour, I would be VERRY thankfull

    Quote from: HYSTERIAH on 12-November-05, 06:24:20
    I really need some help from somebody with the MSI KT6 Delta-FIS2R motherboard
    HYSTERIAH,
    With 76 Replies and 277 Views on your original thread, it looks to me like people have been trying to help you.
    So there is no confusion, I am locking this thread so all your help and advice you receive will be in the same place, so people do not need to jump between threads to keep track of what has already been suggested for this mobo of yours.
    Richard

  • How can we handle browser settings while dealing with the security ?

    Hi ,
    how can we handle browser settings while dealing with the security ?When we configured security in web.xml , during the first request the container is asking for the authentication credentials once they are provided it go's on. but when the user gives a fresh request from the second window within the same browser that time it is not asking for authentication. How can we overcome this.Is there anything to do with server configurations?
    How can we make the container no to keep the things or act like session?

    Ya... I am taking a small example need not happen always but a kind of possibility i am thinking off.
    once the user sign out and just left without closing the browser and a friend (suppose not a good friend ... just kidding...) of that user may open the same jsp or file .This time the security is breached. If that feature or property exists....
    I know what you might say ... the user will log-out before leaving where a programer might invalidate the session at the time of log out.
    Consider the case of a bad Programing or just a programer might forget to invalidate,At that time as a application administrator how can he solve that issue.
    Thanks.......
    Edited by: user8483670 on Jun 6, 2011 1:08 AM
    Edited by: user8483670 on Jun 6, 2011 1:09 AM

  • How do I deal with the"new itunes library" fiasco

    how do I deal with the "new itunes library" fiasco...?

    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • How to deal with the rejected stock if it is rjected by QC

    Dear All,
    please let me know how to deal with the rejected  stock from Quality point of view.i.e., for incoming materails and Finished if returned from customer
    Regards,
    P.Vijaya

    hi
    if material is rejected for incoming material then you can create Notification for incoming material due to  you can return back material with print for that you have to record defects in result recording. in T-code QM02 if result is recorded with defects. or you can create with Qm01.against vendor
    if material is returned from costumer you can create inspection lot for that for that you have to maintained inspection type 06 in material master. you can result record for that you can create notification for that. or rework for this material as per quality check or can scrap
    if have any problem please come back
    regards
    Pravin

  • How to deal with the change in address of plant,

    how to deal with the change in address of plant,companycode,sales org etc.?

    Hi,
    Do you want to change the address of Company code, Plant and Sales org?
    Follow the menu path in SPRO.
    SPRO >> Enterprise structure >> Definition >> Financial accounting >> Define Company code >> Edit company code >> Click on address and change.
    .. Definition >> Sales and Distribution >>  Define ...sales org >> select the sales org and click on address and change.
    ... Definition >> Logistics - general >> Plant >>>> Click on address and change.
    Regards,
    K Bharathi

  • What's the deal with the CC menubar panel?

    What's the deal with the CC menubar panel? The tab to the apps are gone -- looks like it wants me to update the panel itself rather than list my installed apps. I've been on CC for about a month, is this common? Thankfully I can still open all apps normally, but the internet seems to think the "CC Way" is a horror show.
    Do you guys have trouble after updating the updater? All this talk of running "the cleaner" (a mafia term?) and reinstalling everything with each version bump is kinda scary. It could be that people only post online when things go wrong, and 95% of people update just fine. But since I'm new I guess I'd want some reassurance before committing to a night of Cleaning and Reinstalling...
    I'm one of those people who think app updates very 12 to 18 months was just fine (and stable). Would it be harmful to ignore updates for a few months? Lets see, I have a healing brush, smart objects, a blob tool, pretty good 3D in AE, ID seems to handle type pretty well… there's really no reason to update every month is there?
    -- Jim

    Has anyone had a normal non-cleaning install of this week's update?

Maybe you are looking for