Questions tagged [jtextarea]

A JTextArea is a multi-line area that displays plain text.

A JTextArea is a multi-line area that displays plain text.
It is intended to be a lightweight Java Swing component that provides source compatibility with the java.awt.TextArea class where it can reasonably do so.

2035 questions
0
votes
1 answer

New to creating GUIs. How would I combine text area and radio buttons

I understand how to create radio buttons and I understand how to create a text area. What I have trouble with is combing the two onto one frame. Can anyone help me or show me how to do so? Do I have to layout a grid with boarders? Here I was trying…
Esin Kaya
  • 1
  • 1
0
votes
2 answers

JTextArea.append not displaying

I'm trying to write the contents of an array to a JTextArea. I've tried everything I can think of, and I can't understand what isn't working here. I've stripped the unnecessary stuff out of my code, here's the two relevant classfiles: Main…
0
votes
1 answer

How to make one JTextArea change when another is edited?

import javax.swing.*; import java.awt.event.*; import javax.swing.text.DefaultFormatter; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; import javax.swing.event.DocumentEvent; import…
Huang Lee
  • 53
  • 4
0
votes
1 answer

My Code Generator Won't Work Properly

So I'm trying to make a code generator that will generate setter and getter methods if you input variable names like: "int nums" or "String words" etc. My problem is that it can only take one input If you put more than one variable it will give me…
ghost1349
  • 83
  • 1
  • 10
0
votes
1 answer

How to print text messages on jtextarea from a different class

I created a console based program that allowed users to take a math quiz. The program basically generated random numbers and determined if the answer was right or wrong. Now, I'm trying to create the GUI version of this program and I'm stuck. I…
Robert L
  • 27
  • 3
0
votes
1 answer

how to populate data from textarea to jlist

I'm having a problem with the jlist..the data is showing in my jlist whenever i put a data on my textarea but instead of populating the data it will remove the previous one and will only show the current input.. here is my code by the way private…
user4143467
0
votes
2 answers

Redirecting System.out.print(ln) to a textArea

I am redirecting System.out.print() to a JTextArea inside of a JScrollPane. This works fine except for one case as follows in this snippet: public void vcFile(){ System.out.println("In vcFile"); // THIS WORKS! File[] files = getChooser("Select…
Steve D
  • 3
  • 2
0
votes
1 answer

why JTextArea.append() doesn't display anything?

I have two classes: public class VentanaPrincipal extends javax.swing.JFrame { MetodosFicheros objMetodosFicheros; public void ListadoTextArea(String textLine) { listadoTextArea.append(textLine); } private void…
Amaro88
  • 1
  • 2
0
votes
1 answer

Artifacts with semitransparent JTextArea

I try to make semitransparent JTextArea over image, but when text is written on it, sometimes I get annoying rectangles behind the last letter, this rectangles will appear if I will click on text with mouse. I'm trying to make transparency in this…
javakun
  • 11
  • 4
0
votes
2 answers

How to take terminal results and set a JTextArea to read the terminal?

I recently finished up a GUI where a user can input criteria, and get results adhering to said conditions. The program works result wise, but I'm having trouble getting my textField in my GUI to read my terminal window result. My code for the GUI is…
CtRan
  • 1
  • 1
  • 5
0
votes
0 answers

How to append/insert text to JTextArea in equal locations in new line in loops

I have following problem: I create program to count a points of athletics from different school. I adds points from the same school, and try to display it in JTextArea. For example: I'm using to it this part of code: notatnik_k.append("\n" +…
Tomek eM
  • 92
  • 1
  • 1
  • 11
0
votes
2 answers

key pressed how show message file read only in jpanel when text area is non editable?

When i open file in jtextarea. I set to textarea to non editable by using textArea.setEditable(false) but in the when i press the key how to show the message in jpanel file is read only. Thank you.
0
votes
2 answers

How to set JtextArea to keep fixed no of rows?

How can i keep no of rows constant in text area. I need to create a console window for my application. If rows exceeds predefined no of rows first rows must get disposed. As if first written row will be destroyed first when i append anything which…
Hippo
  • 81
  • 1
  • 2
  • 6
0
votes
0 answers

Trouble getting my console output in TextArea, I am expecting the data to appear on multiple lines but it isn't

I am having trouble getting my console/Terminal output to resemble my GUI output in JTEXTAREA. I am expecting the data to appear on multiple lines but it isn't. Can someone take a look and offer an opinion, solution, to my code problem.…
New_Guy25
  • 1
  • 1
0
votes
1 answer

Only one JTextField will output or show on the frame

So I'm trying to make a fill up form when i click on the add menu. So once I click add, it will show me a fill up form and I must I fill it up so that I can view it on the other window or frame with a jtextarea that I made. My problem is that once I…
Barry
  • 59
  • 1
  • 5
1 2 3
99
100