Problem with reading text from .DOC files through java and POI

I have used a jar file "poi-scratchpad-3.2-FINAL-20081019.jar" and "poi-3.2-FINAL.jar" to read text from a .DOC file. I used the "getParagraphText()" function of the class "org.apache.poi.hwpf.extractor.WordExtractor" to get the text.
I am able to get the text in the .DOC file but along with that i am getting the following messages/warnings
Current policy properties
*     thread.thread_num_limited: true*
*     file.write.state: disabled*
*     net.connect_ex_dom_list:*
*     mmc.sess_cab_act.block_unsigned: false*
*     mmc.sess_cab_act.action: validate*
*     mmc.sess_pe_act.block_blacklisted: false*
*     mmc.sess_pe_act.block_invalid: true*
*     jscan.sess_applet_act.stub_out_blocked_applet: true*
*     file.destructive.in_list:*
*     jscan.sess_applet_act.block_all: false*
*     file.write.in_list:*
*     file.nondestructive.in_list:*
*     window.num_limited: true*
*     file.read.state: disabled*
*     jscan.session.origin_uri: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/poi/poi/3.2-FINAL/poi-3.2-FINAL.jar*
*     file.nondestructive.state: disabled*
*     jscan.session.user_ipaddr: 10.136.64.153*
*     net.connect_other: false*
*     thread.thread_num_max: 8*
*     file.destructive.ex_list:*
*     file.nondestructive.ex_list:*
*     file.write.ex_list:*
*     jscan.sess_applet_act.sig_invalid: block*
*     file.read.in_list:*
*     mmc.sess_cab_act.block_invalid: true*
*     jscan.session.policyname: TU1DIERlZmF1bHQgUG9saWN5*
*     mmc.sess_pe_act.action: validate*
*     thread.threadgroup_create: false*
*     net.connect_in_dom_list:*
*     net.bind_enable: false*
*     jscan.sess_applet_act.sig_trusted: pass*
*     jscan.session.user_name: 10.166.64.201*
*     jscan.session.user_hostname:*
*     file.read.ex_list:*
*     jscan.sess_applet_act.sig_blacklisted: block*
*     jscan.session.daemon_protocol: http*
*     net.connect_src: true*
*     jscan.sess_applet_act.unsigned: instrument*
*     mmc.sess_pe_act.block_unsigned: false*
*     file.destructive.state: disabled*
*     mmc.sess_cab_act.block_blacklisted: true*
*     window.num_max: 5*
Below the above messages/warnings the data is getting printed. Only the text part of the data is retrieved not the fonts, styles and bullets etc.
Can anyone explain me why I am getting above warnings and how can I remove them. Is it possible to fetch the text depending on delimiters.
Thanks in advance,
Tiijnar
Edited by: tiijnar on May 21, 2009 2:45 AM

The jar files which were used are downloaded from http://jarfinder.com. Those jars created the problem of displaying those messages on console. I downloaded APIs from apache.org and used them in my application. Now my application is running good.
Tiijnar

Similar Messages

  • Problem with reading String from Xlsx file.

    Hi! I am trying to read string and numerical data from an xlsx file and trying to display its contents in a word file. I tried converting it to a .lvm file too. On using the "Read From Spreadsheet" tool, I get random characters as output. On using " Read From Measurement File" tool, I am getting an error saying "Error 100 occurred at Read From Measurement File->Untitled 1". What do I do? At the end I need to display the output, row by row, in a Microsoft Word file. I am so lost. Please Help.
    Solved!
    Go to Solution.

    bsvare wrote:
    labview currently does not read directly from an xlsx file. If you convert the xlsx to an xls file first, then you can use the read from spreadsheet tool to load the data from the file.
    Hey, I tried doing that. It still just gave the values 0.00 in all the cells of the indicator array. Plus my file has string in it also. The data type in the spreadsheet was "general". Here in the tool, it is "Double". I changed the tool data type to string and spreadsheet to text but I only got gibbrish for my efforts.
    Thanks anyway!

  • Indesign CS3-JS - Problem in reading text from a text file

    Can anyone help me...
    I have an problem with reading text from an txt file. By "readln" methot I can read only the first line of the text, is there any method to read the consecutive lines from the text file.
    Currently I am using Indesign CS3 with Java Script (for PC).
    My Java Script is as follows........
    var myNewLinksFile = myFindFile("/Links/NewLinks.txt")
    var myNewLinks = File(myNewLinksFile);
    var a = myNewLinks.open("r", undefined, undefined);
    myLine = myNewLinks.readln();
    alert(myLine);
    function myFindFile(myFilePath){
    var myScriptFile = myGetScriptPath();
    var myScriptFile = File(myScriptFile);
    var myScriptFolder = myScriptFile.path;
    myFilePath = myScriptFolder + myFilePath;
    if(File(myFilePath).exists == false){
    //Display a dialog.
    myFilePath = File.openDialog("Choose the file containing your find/change list");
    return myFilePath;
    function myGetScriptPath(){
    try{
    myFile = app.activeScript;
    catch(myError){
    myFile = myError.fileName;
    return myFile;
    Thanks,
    Bharath Raja G

    Hi Bharath Raja G,
    If you want to use readln, you'll have to iterate. I don't see a for loop in your example, so you're not iterating. To see how it works, take a closer look at FindChangeByList.jsx--you'll see that that script iterates to read the text file line by line (until it reaches the end of the file).
    Thanks,
    Ole

  • A problem with copying text from english pdf to a word file

    i have a problem with copying text from english pdf to a word file. the english text of pdf turns to be unknown signs when i copy them to word file .
    i illustrated what i mean in the picture i attached . note that i have adobe acrobat reader 9 . so please help cause i need to copy text to translate it .

    Is this an e-book? Does it allow for copying? It is possible that the pdf file is a scan of a book?

  • Problem with the text from previous year in current year appraisal (PPR)

    Hi Gurus,
    I have some problem with the text from the PPR of the previous year in the PPR current year.
    The text from the previous year have not the same displaying in the tab "previous year" of  the current year PPR.
    EXAMPLE :
    this is write in the PPR of year 2009 in Individual Targets without Incentives (tab My S-imple) :
    -Aufrechterhaltung der MA motivation, in dieser Zeit der Neuorientierung.
    -G1 Unterstüzung
    -Fachübergreifende Teamarbeit ausbauen
    Gefährdungsbeurteilung weiter führen
    -tragen von PSA einfordern
    -VI Opt.(Intervalle)
    -Azubi und Praktikanten AUsbildung unterstüzen
    and this is what I have in the PPR of 2010 in Individual Targets without Incentives (tab Previous Year's Targets):
    -Aufrechterhaltung der MA motivation, in dieser Zeit der-Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    -Aufrechterhaltung der MA motivation, in dieser Zeit der
    there is the error, all the end of the text isn't displayed and the begin of the text is repeated.
    I think that this issue is created at the creation of the PPR.
    If someone have a idea he is welcom.
    thanks and regards

    Hi,
    Please follow the note:425601,
    Go to Tcode: OBA5 change the error messge into warning message. carry out the settlement and roll abck the warning message into the error message after sucessfull settlement.
    Reward points if found useful.
    Thanks!

  • I am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    hi TimoHahn,
    i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
    Root cause of ServletException.
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
    at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Help! Problem with reading objects from file

    I wrote a "Library" program for an assignment, and one of the requirements is that the library store all of its information to file upon exit, and reload this information from file when run.
    Well, the writing to file part is working. I'm using a FileOutputStream object and an ObjectOutputStream object. I can tell from the file size of the .dat file that information is going into it.
    But what I can't do is read from file. For that, I'm using a FileInputStream and an ObjectInputStream. I keep getting this exception:
    java.io.EOFException
         at java.io.DataInputStream.readInt(Unknown Source)
         at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source)
         at java.io.ObjectInputStream.readInt(Unknown Source)
         at Library.readDataFromFile(Library.java:350)
         at Library.<init>(Library.java:63)
         at LibraryDriver.main(LibraryDriver.java:6)I looked this exception up and it says it's thrown when a data input stream unexpectedly ends....But I am instantiating the input streams just before I try to read from file:
                            fileInStream = new FileInputStream(libraryFile);
                   objInStream = new ObjectInputStream(fileInStream);
                   Object[] objectArray = new Object[objInStream.readInt()];Both input streams have methods that "return the number of bytes that can be read from this file input stream without blocking". Just for kicks, I tried writing that number to the console.
    For the FileInputStream, I get 404 bytes.
    For the ObjectInputStream, I get 0 bytes.
    So I guess it's a problem with the ObjectInputStream? Anyone have any suggestions as to how I can fix this, please?

    Yep, here's the relevant code from the writeToFile() method:
                          for (int i = 0; i < libraryAuthors.length; i++) {
                        currentAlphaAuthorList = libraryAuthors;
                        for (int j = 0; j < currentAlphaAuthorList.size(); j++) {
                             currentAuthor = (Author) currentAlphaAuthorList.get(j);
                             objOutStream.writeObject(currentAuthor);
                   objOutStream.flush();
                   objOutStream.close();

  • Problems with displaying text from gtk+-2.0 with Cairo

    I've got a 64-bit app that uses gtk+-2.0 (2.8.17 with Cairo). I had to build my own libraries since the gtk+-2.0 libraries Solaris 10 ships with is 32-bit only (and does not contain Cairo support). The app is statically linked so that our customers don't have to do any more than just install the app.
    I've got a customer who's using a Sun Ray 2fs to run our app from a Sun Ray server. The problem is that none of the text in the UI is readable (including the menubar). He sent a screenshot and I can tell it's rendering the glyphs, just not correctly. The best way of describing the text rendering problem is to take a bitmap of antialised text drawn with a black pen color. Now remove all non solid black pixels. You only see pieces of the glyphs (typically, just the vertical and horizontal parts).
    We don't have a Sun Ray client to test with but for testing purposes, I installed our app on freshly built Solaris 10 (5/09) and Open Solaris systems with no modifications to the virgin systems. I could run our app on both Solaris systems and display the app on a remote X display just fine. I asked the customer to try a real X display and he ran X-Win32 on a Windows XP guest using VirtualBox on the Sun Ray server and our app appeared just fine on his Sun Ray client. I told him if our app displays just fine on a real X display, then the problem must be with the Sun Ray server.
    Has anyone encountered this problem? I'm going to try building the latest gtk+-2.0 libraries but I'm not convinced it's going to do any good. I don't think it's a Fontconfig configuration problem because our app worked out of the box on freshly installed systems (unless perhaps Sun has made changes to /etc/fonts/fonts.conf since the version on his system versus ours).
    PS. We actually need the Cairo graphics support. It just happens that the version of Pango that's in 2.8 (and all versions of gtk+-2.0 since) also uses it for text rendering in the widgets.

    Garrett Cobarr wrote:
    > I have been attempting to import text from Illustrator
    CS2 into Flash 8. I
    > would like to retain the layers if possible.
    >
    > I am having many different problems as I have
    experiemented at the AI side.
    > One is having the text come in with the outline offset
    and no longer alligned.
    > When I drag and drop, the outline completly dissappers.
    The text when it does
    > come in is converted to a png and longer has the layers
    seperated.
    >
    > I am also getting a message in the report window, on
    some of my tries, that it
    > is an improper PDF.
    >
    > The bottom line question is: What is the recommended
    method of importing text
    > from AI CS 2?
    You have to remember that both programs are totally different
    animals and simply
    some of the option used by you in AI won't be working or
    can't be translated into
    flash's environment. You will never get editable content,
    just an image.
    Export to SWF from AI and import that SWF to flash. Should be
    as close as possible
    to original file tho I can't assure your layers will
    maintain.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Flash CC Air iOS: Problems with loading text from an external xml located on a server.

    So I have this code allowing me to load text from an xml located on a server. Everything works fine on the Air for Android. The app even works in the ios emulator, but once I export my app to my ios device with ios 7, I don't see any text. The app is developed with Air sdk 3.9. What could be the reason? Do I need any special permissions like on Android? Does ios even allow to load xml from an external server?
    Any clues?

    It was my bad. I linked to a php file to avoid any connection lags, which was absolutely fine on the android, but didn't seem to work on the ios 7. So all I did is change the php extension to xml and it worked without any problems.

  • Trouble exporting pdf with Arabic text to .doc file

    I am having an issue exporting a pdf from the trial of Acrobat Pro XI on a Windows 7 computer.
    The pdf has a table with English fields in the left column and Arabic equivalents in the right column.
    It appears to display fine within Acrobat, so I assume it has fonts embedded and that Acrobat is somehow handling the display of the Arabic font correctly.
    I need to export this to .doc or .docx so that I can enter additional data.
    When I convert to .doc, the English column and fields convert pretty good, but the Arabic fields do not display well at all. I am not sure if this is some sort of trouble with Word (or the Windows OS) requiring an Arabic font or Arabic text support to be installed on the system or if there is some other issue (such as Acrobat not handling the conversion well)??.
    I did note that there is an Arabic Font add on to Acrobat that can be downloaded from Here:
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4885&fileID=4558
    However, since Acrobat is seeming to properly display the Arabic text, I don't know that this is required...additionally when I tried to install the Arabic font support from that URL, it told me that Acrobat X was require, I am using Acrobat XI reader (installed with the trial version of Acrobat pro that I wish to purchase if I can get this working properly).
    Thanks in advance for any assistance or advice offered on this subject.
    David Dean

    Unfortunately our conversion engine cannot convert text, such as Arabic, which reads from right to left.  It maybe something that we add in the future however it is not available at this time.
    Please refer to the article mentioned below : http://forums.adobe.com/docs/DOC-1812
    ~Pranav

  • Problem with reading NOOK from ADE

    I finally figured out how to authorize my Nook so that I can transfer a library EPUB from ADE to my Nook, but whatever gets copied is not readable on my Nook.  I do not have this problem with my XP computer, which I can no longer go online with, but I have this problem with my 8.1 Windows computer.  Help!

    hi,
    - you can use NFS (if the file is accesible from the XI server)
    via shared folder
    - you can use FTP but your XI server must be able to log on to this FTP server
    - if you use FTP from your local machine the same applies
    (your XI server must be able to log on to this FTP)
    so try checking firewall settings and connection with your admins first to find out if someone
    can log on from the XI server machine to your FTP servers 
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • JAR app reading text from .cfg file

    I wrote an application that needs to read txt a file. The file is saved as a .cfg file. I access it with the getResource() method:
    url = myClass.class.getResource("desiredFile.cfg");
    Before I jar it, it runs fine (in JBuilder). Then, when I jar the app and I run the .jar, it gave me the following error:
    file:\C:\ES\ES.jar!\es\textFile.cfg (The system cannot find the path specified)
    The wierd thing is that my app also plays audio from a .wav file, and it has no problem with that. I access the .wav file the same way:
    url = myClass.class.getResource("desiredFile.wav");
    And it plays the audio just fine!
    How can I read from the .cfg???
    Please help!!! Thanks!

    use myclass.class.getResourceAsStream("desiredFile.cfg") this will return you an InputStream, so you'll be able to use a FileReader, or whatever your favourite reader is.

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • Problem with gettin text from a new window

    Hi
    I have been trying to for sometime to work out why i cant get this to work...I open a main window which opens a new window when a button is pressed. This window has a text field where data can be typed, it has a button called "Send" which then allows the data to be send. However, when "Send" is pressed, a NullPointerException is throwen in the ActionListener because it is unable to get the text from the text field.
    Anyone got any idea why, have done a small mock up just to give an example :
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class TwoWindows implements ActionListener{
         private JTextField chatLine;
         public volatile boolean start = false;
         //******************************GUI Production******************************
         public TwoWindows() {
              JFrame frame = new JFrame("Multicast Discovery");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel connectpanel = new JPanel();
              JButton button3 = new JButton("Open New Window");
              button3.setActionCommand("connect");
              button3.addActionListener(this);
              connectpanel.add(button3);
              frame.getContentPane().add(connectpanel, BorderLayout.PAGE_END);
              frame.pack();
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
         //*****************************action listener******************************
         public void actionPerformed(ActionEvent ae)
              //get what button was pressed
              String button = ae.getActionCommand();
              if (button.equals("search"))
                   System.out.println("\n Do Something!");     
              else if (button.equals("cancel"))
                   System.out.println("\n Do Something else!");     
              //start new window here
              else if (button.equals("connect"))
                   setupChat();
              if (button.equals("send"))
                    if (start)
                              //try to get the data from the new window
                              String s = chatLine.getText();
                              System.out.println("This has been inputted : " + s);
         //*****************************setup new window*****************************
         public void setupChat()
              JFrame frame01 = new JFrame("TCP Chat Window");
              frame01.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // Set up the chat pane
                 JPanel chatPane = new JPanel(new BorderLayout());
                JTextArea chatText = new JTextArea(10, 20);
            chatText.setLineWrap(true);
            chatText.setEditable(false);
            chatText.setForeground(Color.blue);
            JScrollPane chatTextPane = new JScrollPane(chatText,
            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
            JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            JTextField chatLine = new JTextField("Type Here!");
            JButton button4 = new JButton("Send");
              button4.setActionCommand("send");
              button4.addActionListener(this);
              chatPane.add(chatLine, BorderLayout.CENTER);
              chatPane.add(button4, BorderLayout.SOUTH);
             chatPane.add(chatTextPane, BorderLayout.NORTH);
              chatPane.setPreferredSize(new Dimension(200, 215));
              frame01.getContentPane().add(chatPane);
              frame01.pack();
              frame01.setLocationRelativeTo(null);
              frame01.setVisible(true);          
              start = true;
         public static void main(String[] args)
         new TwoWindows();
    }

    public class TwoWindows implements ActionListener{
         private JTextField chatLine;
         public volatile boolean start = false;
         public void setupChat()
    JTextField chatLine = new JTextField("Type
    ld("Type Here!");
    You have two variables called chatLine. One is a class field the other is a local object in setupChat.
    Change
    JTextField chatLine = new ...
    to
    chatLine = new ...

Maybe you are looking for

  • Why is FM10 crashing when I change conditional text settings?

    When I go from "show certain conditions" to "show all" in some, but not all, files in a book, FM 10 crashes. I've tried saving as MIF, then reopening, but it still happens eventually. Sometimes it happens with the first file I open, sometimes not unt

  • No Adapters visible - no connection to Adapter Engine

    Hi - again i start a post. We have problem that we have no adapters in CC-Monitor but Adapter Engine status is green. Therefore we treid to refresh Cache which run fine, except when we Go To --> Adapter-Engine-Cache - nothing is shown. In Integration

  • Types in Garbage Collection??

    Hi Can any one tell me, Is there any types in Garbage Collection?? regards guna

  • Error message -42401 missing

    I unes locks up as it loads then error message appears; " i tunes -42401 missing".   cannot get past the spinning pizza.  Need to re-bot to start all over and the cycle starts again. Mac Book Pro running OSX 10.9.5 2.4 GHz Intel Core 2 Duo 8 GB ram 1

  • Edit occurs somewhere else in timeline in fcp x

    I've been having a strange problem in fcp x 10.0.9, and it has transferred over to 10.1 Essentially, when I do an insert edit, rather than placing the clip at the playhead, the new clip is placed at the previous edit point. And where the playhead act