How to append text to a JTextArea?

Frame problem "Java"?

  • hi , if anyone can help me on the use of JFrame and JtextArea well i am trying to write a method that will create a frame displays two text areas (JTextArea) in a grid layout (1 row, 2 columns). The first text area will be used to display the contents of the original array, before sorting, and the second one will be used to display the array contents sorted. that how far i wrote and i really dont know where to go from here public static void displayResults(JTextArea area, Room[] rooms,int length) { textArea.setEditable(false); for ( int i = 0; i < rooms.length; i++ ) { textArea.append(rooms1[i]+"\n"); } JFrame bigTextArea = new JFrame("Queens College Rooms"); bigTextArea.setDefaultCloseOperation(JFr… bigTextArea.setSize(400,600); bigTextArea.getContentPane().add(textAre… BorderLayout.CENTER); bigTextArea.setVisible(true); }

  • Answer:

    I can't copy and paste all of your code. It looks like Yahoo! Answers truncates your longer lines of code and replaces your code with ellipses. I'm not able to send an email to you through Yahoo! Answers, but you can send one to me if you want me to help you with this.

moussa55... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.