Swing Component for viewing huge text file

i need to view (only view not edit) a huge text file (3 mb)
jtextarea is for small files i need somthing else

What error are you getting?
I was able to bring in a 7MB text file into a JTextArea without problems. It took a while (about 15 seconds), but it still loaded.

Similar Messages

  • Swing component for awt.canvas

    Hi,
    Can anyone tell me the equivalent SWING component for awt CANVAS. I need it because i need to display only Images (nothing else) on it. If anyone can tell how I can do it.

    JPanel is the Swing-equivalent of java.awt.Canvas, but if you are just displaying images, you can use the JLabel class, which supports use of images as icons (see also ImageIcon class).
    Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • Set a timeout for "read from text file"

    I Need to read from a text file on a remote pc and use the read from text file function to do this. It wotks but sometimes this pc is down causing long wait times in my vi.
    Is there a way to set a timeout for the read from text file function, or is there an other solution?
    Thank you

    You could check that the path is valid first before you attempt to read the file.  hen put the file read in a True-False case structure based on the results of the check.  You can use the function "Check if File or Folder Exists"  It checks whether a file or folder exists on disk at a specified path. This VI works with standard files and folders as well as files in LLB files.   The function is found in the File I/O --> Advanced File Functions palette.
    Tom

  • Turning off caching for loading a text file

    I'm new to AS3 and don't understand the properties setting
    for URLRequest. I'm trying to turn caching off so when I reload the
    text file, it always gets a fresh copy. I keep getting compiler
    errors however with the useCache line. I'm not accessing the
    properties correctly or something. When I take out that line it
    works fine but always fetches the cached file.
    My code is:
    loadDoctorVariables();
    function loadDoctorVariables() {
    var requestJo:URLRequest = new URLRequest("
    http://www.grxsolutions.com/gtslideshow3/"+doctorURL+".txt");
    //requestJo.useCache(false);
    requestJo.useCache = false;
    var variables:URLLoader = new URLLoader();
    variables.dataFormat = URLLoaderDataFormat.VARIABLES;
    variables.addEventListener(Event.COMPLETE, completeHandler);
    try
    variables.load(requestJo);
    catch (error:Error)
    trace("Unable to load URL: " + error);
    function completeHandler(event:Event):void {
    var loader:URLLoader = URLLoader(event.target);
    trace(loader.data.dayNames);
    trace(loader.data.monthNames);
    trace(loader.data);
    trace(loader.data.saturationColor);
    //saturationColor=10&hue=100&tint=255&bright=12&bgimage=ironman&slidesused=1,2,3,4,7,8,9, 10,11&voice=male1&alternateslides=7,doctorbob1,11,doctorbob2
    }

    append a random string to the URL, ie
    var requestJo:URLRequest = new URLRequest("
    http://www.grxsolutions.com/gtslideshow3"+doctorURL+".txt"+"?c="+Math.random());

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • VBScript for parsing multiple text files

    Hi,
    I have around 175 text files that contain inventory information that I am trying to parse into an Excel file. We are upgrading our Office platform from 2003 to 2010 and my boss wants to know which machines will have trouble supporting it. I found a script
    that will parse a single text file based upon ":" as the delimiter and I'm having trouble figuring out how to change it to open an entire folder of text files and write all of the data to a single Excel spreadsheet. Here is an example of the text
    file I'll be parsing. I'm interested in the "Memory and Processor Information" and "Disk Drive Information" sections mainly.
    ABEHRENS-XP Computer Inventory
    OS Information
    OS Details
    Caption: Microsoft Windows XP Professional
    Description:
    InstallDate: 20070404123855.000000-240
    Name: Microsoft Windows XP Professional|C:\WINDOWS|\Device\Harddisk0\Partition1
    Organization: Your Mom
    OSProductSuite:
    RegisteredUser: Bob
    SerialNumber: 55274-640-3763826-23029
    ServicePackMajorVersion: 3
    ServicePackMinorVersion: 0
    Version: 5.1.2600
    WindowsDirectory: C:\WINDOWS
    Memory and Processor Information
    504MB Total memory HOW CAN I PULL THIS WITHOUT ":" ALSO
    Computer Model: HP d330 uT(DG291A)
    Processor:               Intel(R) Pentium(R) 4 CPU 2.66GHz
    Disk Drive Information
    27712MB Free Disk Space ANY WAY TO PULL THIS WITHOUT ":"
    38162MB Total Disk Space
    Installed Software
    Here is the start of the script I have so far. . .
    Const ForReading = 1
    Set objDict = CreateObject("Scripting.Dictionary")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.OpenTextFile("C:\Test\test.txt" ,ForReading)
    WANT THIS TO BE C:\Test
    Do Until objTextFile.AtEndOfStream
    strLine = objTextFile.ReadLine
    If Instr(strLine,":") Then
    arrSplit = Split(strLine,":") IS ":" THE BEST DELIMITER TO USE?
    strField = arrSplit(0)
    strValue = arrSplit(1)
    If Not objDict.Exists(strField) Then
    objDict.Add strField,strValue
    Else
    objDict.Item(strField) = objDict.Item(strField) & "||" & strValue
    End If
    End If
    Loop
    objTextFile.Close
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = True
    objExcel.Workbooks.Add
    intColumn = 1
    For Each strItem In objDict.Keys
    objExcel.Cells(1,intColumn) = strItem
    intColumn = intColumn + 1
    Next
    intColumn = 1
    For Each strItem In objDict.Items
    arrValues = Split(strItem,"||")
    intRow = 1
    For Each strValue In arrValues
    intRow = intRow + 1
    objExcel.Cells(intRow,intColumn) = strValue
    Next
    intColumn = intColumn + 1
    Next
    Thank you for any help.

    You are The Bomb.com! I had to play around with it to pull some additional data (model and processor) and then write a quick macro to remove the unwanted text and finally I wanted the data to write in columns instead of rows so this is what I ended up with:
    Option Explicit
    Dim objFSO, objFolder, strFolder, objFile
    Dim objReadFile, strLine, objExcel, objSheet
    Dim intCol, strExcelPath
    Const ForReading = 1
    strFolder = "c:\Test"
    strExcelPath = "c:\Test\Inventory.xlsx"
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Workbooks.Add
    Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
    intCol = 0
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(strFolder)
    For Each objFile In objFolder.Files
      intCol = intCol + 1
      Set objReadFile = objFSO.OpenTextFile(objFile.Path, ForReading)
      Do Until objReadFile.AtEndOfStream
        strLine = objReadFile.ReadLine
        If (InStr(strLine, "Computer Inventory") > 0) Then
          objSheet.Cells(intCol, 1).Value = Left(strLine, InStr(strLine, "Computer Inventory") - 2)
        End If
        If (InStr(strLine, "Total memory") > 0) Then
          objSheet.Cells(intCol, 2).Value = Left(strLine, InStr(strLine, "Total memory") - 2)
        End If
        If (InStr(strLine, "Computer Model:") > 0) Then
          objSheet.Cells(intCol, 3).Value = (strLine)
        End If
        If (InStr(strLine, "Processor:") > 0) Then
          objSheet.Cells(intCol, 4).Value = (strLine)
        End If
        If (InStr(strLine, "Total Disk Space") > 0) Then
          objSheet.Cells(intCol, 5).Value = Left(strLine, InStr(strLine, "Total Disk Space") - 2)
        End If
        If (InStr(strLine, "Free Disk Space") > 0) Then
          objSheet.Cells(intCol, 6).Value = Left(strLine, InStr(strLine, "Free Disk Space") - 2)
        End If
      Loop
    Next
    objExcel.ActiveWorkbook.SaveAs strExcelPath
    objExcel.ActiveWorkbook.Close
    objExcel.Quit
    Thanks again!
    Hi ,
    I am have very basic knowledge about VB scripting, but this code could be the perfect solution i am looking for. could you guide me exactly how to run and test the same , i would be really thankful for your kind and generous support on this.
    Thanks ,
    Veer

  • Outbound interface program for downl;oading text file

    Hi,
    I m working with outbound interface program which downloads text file into application and presentation server upon the selection.
    My probelm is
    The data format in the text file
    Whenever interface sends 1 record to the text file and next record should start continuation to the first record with
    seperator like some synbol.
    Please tel me posr the sent for this

    Hi,
    I m working with outbound interface program which downloads text file into application and presentation server upon the selection.
    My probelm is
    The data format in the text file
    Whenever interface sends 1 record to the text file and next record should start continuation to the first record with
    seperator like some synbol.
    Please tel me posr the sent for this

  • How to create empty text file on target system for empty source text file

    Hi All,
    I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
    Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs.
    But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
    Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
    Thanks in Advance....
    Regards
    Sreeni

    >
    Sreenivasulu Reddy jonnavarapu wrote:
    > Hi All,
    >
    > I have an issue in handling empty file in the Text (FCC) to Text (FCC) file scenario. Interface picks text file and delivers on target system as text file. I have used FCC in both sender and receiver CCs.
    > Interface is working fine if the source file is not empty. If the source text file is empty (zero Bytes), interface has to delivery an empty text file on target system.  I have setup empty file handling options correctly on both CCs.
    >
    > But when I tried with an empty file I am getting the error message 'Parsing an empty source. Root element expected!'.
    >
    > Could you please suggest me what I need to do to create an empty text file on target system from empty source text file?
    >
    > Thanks in Advance....
    >
    > Regards
    > Sreeni
    the problem is that when there is an empty file there is no XML for parsing available. Hence in case you are using a mapping it will fail.
    What ideally you should do is to have a module that will check if the file is empty and if so write out an XML as you want with no values in the content/fields.
    Or the next choice would be to have a java mapping to handle this requirement. I guess that on an empty file the java mapping will go to an exception which you can handle to write out your logic/processing

  • VBScript doesn't work for UTF-8 text files

    I'm new to scripting. When I tried to run the sample VBScript on page 8 of the PDF doc, "Adobe Introduction to Scripting," I got an error message, "Invalid Character, Line 1, Column 1."
    I'm running CS3 Design Premium on Windows XP Pro.
    The problem turned out to involve the character encoding of the .jsx text file. I use UTF-8 UNICODE encoding for all of my text files, and the VBScript interpreter has not been updated to handle UTF-8. When I saved the file with the Windows 1252 Western European encoding, the script worked as advertised.
    I use UTF-8 now, and I'm planing to go to UTF-16. I want my Web sites and text files to display the way I wrote them anywhere in the world, and I don't want character-set restrictions on text that I insert into CS3 docs using a script.
    I don't know if the problem lies with Adobe or with Windows, but it represents a fault that needs to be fixed.

    Maybe the problem is that you're trying to write a VBScript in a .jsx file? You need to rename it to .vbs .

  • New Swing Component for Swing Palette in NetBeans

    Hi guys,
    I want to write a new Swing component (Bean) for drawing vertical and horizontal lines to use with netBeans GUI designer.
    Could anyone direct me to a tutorial
    thanks in advance

    JTextcomponent.

  • Searching for string in text files on XP

    Hi,
    At the moment I'm working on a Struts program. The output I get is:
    The requested resource (Invalid path /displayAddProductForum was requested) is not available.Somewhere in my files, I have a line containing /displayAddProductForum that should be displayAddProductForm. As I'm using XP as my development platform, I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP?
    Abel

    sabre150 wrote:
    kajbj wrote:
    sabre150 wrote:
    Abel wrote:
    , I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP? Err.. On my XP it does search though java/jsp files if I tell it to!You mean by modifying the registry?No! Using the right mouse click on a directory to get a context menu -> Search -> (All or part of filename : .java ) and (A word or phrase in the file : blah blah blah) -> Search
    Edit : Errr.. maybe I'm talking rubbish because I have just tested this and it only finds 5 java files of mine that contain the word 'class'! I'm sure it used to work because in my 'Windows' days I frequently used it.
    Edited by: sabre150 on Dec 20, 2007 12:44 PMSounds a bit odd. Search in windows should only search in registered file types and neither jsp nor java are registered types. It's however possible to modify the registry and add extensions (but it's not possible to say search within all types of files, and that sucks)

  • Choosing rows for adding into text file

    Hello!
    Recordset with several rows per reference.
    Need to find references with at least one of four rowreferences.
    Not all references include any of the four rowreferences.
    Need to sum up all rows of reference except the rows with the four rowreferences and group by customerid
    If sum per customerid is above set limit, add a line to textfile, one line per reference, sum of special four rowreferences, sum of all rowreferences
    Tried this:
    Set s7=rows with one or many of the four rowreferences grouped by reference
    For finding out which references are valid for inserting into the textfile
    Set s8=sum of all rows per reference grouped by customerid
    For getting all data for reference.
    Set s9 = all customerid’s
    I have tried several do...loop statements, but I cannot get it right.
    I tried to move through s9, find matching rows from s8, then add up sum per reference in s8 minus sum per reference in s7.
    Then if sum per customerid is more than set limit, add separate rows from s8 of this particular customer
     into the file.
    What is the best way to solve this ?
    Thank you in advance!

    I previously asked for your table structure and you posted this --
    here are the tables:
    Customerinvoices:
    ma
    Arve
    Kellelt
    Summa
    Kuupaev
    52674
    150057
    customer1
    588
    16-veebr-15
    52673
    2015039982
    customer2
    67,2
    13-veebr-15
    52672
    2015040760
    customer2
    67,21
    13-veebr-15
    52671
    2015040528
    customer2
    121,21
    13-veebr-15
    Customerinvoicesread
    SaadudArveNr
    Kulu
    Sum
    Hain
    52674
    22-01
    48
    52674
    22-07
    50
    52674
    16-29
    83,3
    52674
    16-29
    156,8
    52674
    16-29
    83,3
    52674
    16-29
    166,6
    52673
    58-06
    67,2
    52672
    58-06
    67,21
    52671
    58-06
    121,21
    and then I need the data to go to the csv so that:
    invoice#; sum without tax; sum of tax, date
    150057; 490; 98, 16.02.2015
    There is the sum of all rows except the tax rows and then the sum of all the tax rows.
    That did not give me your structure.  The results line 150057; 490; 98;... did not match data posted.
    I cannot help if I do not have the whole picture.
    Build a little, test a little

  • Tips for managing huge HD files??

    I have a Sony HDR SR1 video camera (AVCHD format) and I import files directly into imovie for editing. the problem is that imovie is creating massive files that are rapidly filling my 500GB disk. One minute of imported HD video (which imovie stores as a quicktime file) takes up about 32GB. It hasn't taken long to wipe out my disk at that rate.
    Does anyone else have this issue? Is there a more appropriate way of storing the raw footage? The video camera only store 30GB on its internal disk and this is meant provide around 7 hours of HD footage. If the file sizes really do need to be that large is there anyone out there who's sorted out storage and backup routines?

    AVCHD is a "Highly" compressed video format, specifically designed to allow YOU to put unimaginable amounts of HD video in a couple-of-pounds handheld device. Because of the way the video is compressed, it is not really suitable for EDITING on its native format. Rather, Apple solves the problem for you "Transcoding" it to Apple Intermediate Coded "AIC", which allows you to do 2 things:
    1.- Frame-specific editing/splicing etc.
    2.- Manipulate and edit with low demands for your CPU.
    AVCHD is probably the most efficient compression conceived "yet".
    Now, how???? to handle the fact that the files are several times larger than the original (That of 32 Gigs per minute does not sound right!!!!, it should be a little less, I think).
    1.- In order to save the raw, highly compressed data (in AVCHD): You can save the main folder with the "unaltered" contents of the Camcorder hard drive into an external drive. Later on, you can connect the drive or mount the folder as a disk image, and iM08 will think you connected a camera, and voila, ready to import again. I have a Canon HG-10 and the main folder in the hard drive is actually named "AVCHD".
    2.- Import "only" what you are going to use, when you are going to use it. The file, now in AIC, will take some space, go ahead and edit, make your project and export/output out of iM08. Now, is up to you whether you get rid of your iM08 Project and Event, in order to reclaim those valuable Gigs.

  • Error - Document Access Denied. A component for viewing this document needs to be updated

    Hi,
    I am having a few problems opening a handfull of PDF documents on the network using Adobe Acrobat Reader XI & X. When opening the documents with Adobe Acrobat Reader X I receive the below error message
    I am then directed to a site to instal the FileOpen plugin which I do. I have installed the plugin both automatically using an msi file and manually by placing it in the adobe plugins folder however none work. I am still getting the same error message. As this document was located on a network share I copied it to my desktop and launched it. I still received the same error message however I updated adobe reader to XI and re-installed the fileopen plugin. Now I am receivng the below error message and I am still unable to open the document. When clixking OK it takes me to a site to download the FileOpen plugin which I have already installed.
    Protected mode is not turned on. Any help with this error would be greatly appreciated.
    Regards.

    You'd need to contact the makers of FileOpen. It isn't an Adobe product.Check especially whether your version of Reader is supposed to be compatible with it.An update to it may be needed.

  • Cannot preview filetype please download the file for viewing and garbled text on a downloaded image

    Dear Madam or Sir,
    When I click on a file titled "Subject Access Request Letter re Account Number 12527629 Sort Code 60-10-34 24022015.pdf", which is stored in my Account on Acrobat.com I get the response "Cannot preview filetype please download the file for viewing". This file was created from an OpenOffice .odt document of the same title. Please advise.
    I downloaded an image, which purports to be a .pdf, from the Royal Mail Track & Trace web facility using my Samsung S5. The text that I expect to see might as well be hieroglyphics for all its similarity to text. Please advise.
    Regards,
    Ron Platt
    PS I have tried to attach both files (.pdf) but am advised "That image type is forbidden". Please advise.

    Hi Laura,
    I have found the solution to be:
       1. Not to upload to "Document Cloud" from the .pdf stored on my PC and
       open on screen.
       2. To login to Acrobat.com from the .pdf stored on my PC and open on
       screen, select "Document Cloud" and the sub-folder required and then upload
       the file
    I have a feeling that there is a glitch somewhere, because after I have
    opened a number of .pdf files stored on my PC, and irrespective of whether
    I have closed them prior to opening the next .pdf file or left them open,
    Acrobat Reader will display (Not responding) in the window title bar. The
    "number of files" equates to less than 10. I, then, click on the X at the
    right of the window title bar and I am given the option of "Close the
    program" or "Wait until the program responds" (or words to that effect). If
    i choose the latter, nothing happens and I am back at the unhappy status
    quo. If I choose the former, I am told that Windows is searching for a
    solution, which it never finds. I, then, have to shut down the PC and then
    start it up, again. Clicking "Restart" does not solve the problem.
    I have described the above before and received the usual "it cannot be
    Acrobat, it is perfect" response. I could, I suppose, screenshot/snip every
    sequential screen but why should I have to when I have described the
    sequence as fully as I can. So I have found a "workaround" that does not
    solve the "Not responding" problem but does solve the problem of not being
    able to upload from the open .pdf file to the sub-folder in "Document
    Cloud". I am, on occasion, working through the myriad of .pdf files that
    are in the root folder of "Document Cloud" and putting them in the correct
    sub-folder(s).
    I have today read that Google is starting a cellphone service in the USA in
    which a monthly "access" rental (US$20) is paid plus a GB capacity usage is
    elected for at a rate specified, e.g. US$10.00/GB. If the subscriber  does
    not use the elected GB capacity Google refunds the US$value of the unused
    elected GB capacity.
    Suggestion: Adobe applies that kind of policy to its online software
    package usage rates, e.g. I elect to subscribe to a particular level of
    online software package usage monthly, but, if I do not use all of the
    programs included in that online software usage package, I am credited back
    for not having used the softwares, that I did not use, that were inclusive
    in that online software package offer.
    Regards,
    Ron

Maybe you are looking for