19 Topics

Member Avatar for
Member Avatar for dqddani

Hi, I would like to make a window with a given size, and a scrollable textarea to a given place within. When I tried the same with a button instead of textarea, it was no problem: make a JFrame, put a JPanel inside, put a JButton on the panel. Then …

Member Avatar for subhraakasuny
0
257
Member Avatar for oldezwe

Ideally my program should work like this... Upon button click a random message (out of 3 messages) is appended to a text area(or pane, etc). One message should display blue, one green and one red. Currently I am using JTextPane. I have figured out how to append text easily but …

Member Avatar for JamesCherrill
0
315
Member Avatar for grga4life

Hello everyone,I have little problem over here with my work. It gives null pointer about JTextArea in ActionListener. Could anyone help me,please? Thanks in advance Here's code: import java.awt.event.*; import java.io.*; import javax.swing.*; /** * @author Nikola * */ public class FileListener implements ActionListener { private JMenuItem exit; private JMenuItem …

Member Avatar for NormR1
0
168
Member Avatar for Mbot

Im trying to make a highlighter that will highlight a word after I have typed it in a JTextArea. The problem I have, is that after I press space, the highlighter doesnt stop. It continues highlighting the next words as well. public class highLighter { JTextArea ref; Highlighter hilite; String …

Member Avatar for Mbot
0
281
Member Avatar for FALL3N

hey... I wat to change the... well, the cursor (the little blinking thing in a text area where subsequent typing appears) in a JTextArea. [U]Not[/U] the pointer (the mouse icon showing where on the screen the mouse is cuz some ppl thought that was wat I meant) but the cursor …

Member Avatar for FALL3N
0
1K
Member Avatar for Connavar3

Hi everyone! I have written a server client that receives information, does a database transaction and then sends the result back to the client. My client has requested that they be able to view what was received and what was sent in real time. I have used a JTextArea. The …

Member Avatar for Connavar3
0
406
Member Avatar for 2concussions

hello. i am trying to make a text editor. i can't figure out how to get the file that i select in the JFileChooser to show in the JTextArea. and I also can't figure out how to get the text from the JTextArea to save into a .txt file. [code=java] …

Member Avatar for 2concussions
0
437
Member Avatar for abyss776

I've been searching the internet for a way to specify the size of a component within a JPanel, but I haven't been able to find anything that has worked. The best answer I came across was to override the getPreferredSize(), getMaximumSize(), and getMinimumSize() methods of the component, but the component …

Member Avatar for abyss776
0
210
Member Avatar for Danielhuo

I am writing a program, but I cannot find what is wrong with the code. Only need to show one MP3, or an error message if there are any missing fields or an incorrect entry for seconds. It is not storing information about previous songs; it just display the current …

Member Avatar for peter_budo
0
842
Member Avatar for Donieob

I have a JTextArea in a JScrollPane with hundreds of lines of text in it. I would like to add a JComboBox with some key words in it and when the user selects one of the key words the scroll pane moves to the first appearance of this word in …

Member Avatar for peter_budo
0
171
Member Avatar for sathya88

any operation with text area is not working,,,cant find bug... [CODE]import java.io.*; import javax.swing.JMenu; import java.io.FileWriter; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JFrame; import javax.swing.JTextArea; import javax.swing.JSeparator; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JScrollBar; //import javax.swing.JPopupMenu; import java.awt.Container; //import javax.swing.JFlowLayout; import javax.swing.JScrollPane; import java.awt.Color; import java.awt.Font; import java.awt.FlowLayout; import javax.swing.JFileChooser; import javax.swing.JColorChooser; …

Member Avatar for sathya88
0
202
Member Avatar for damons

I want to combine a console application with a GUI in netbeans.I tried to do it using a jButton.I want to get the output of the console application into a jTextArea.There is a function called private static void printBytes(byte[] data, String name)in the console application.when calling that function have to …

Member Avatar for JamesCherrill
0
173
Member Avatar for rjdelight

I'm trying to display some text in a JTextArea I have set up in a simple GUI. Easy right? That's what I thought, but I'm clearly not that advanced at Java. The hook is the information I want to display in the JTextArea is in a text file (file.txt). Right …

Member Avatar for mKorbel
0
1K
Member Avatar for rjdelight

Hi all, I'm trying to get the information from a text file to show up in the JTextArea I have in a GUI. I'm using the GUI editor in NetBeans, because I'm a Java newb. I've been reading a lot of things on the web and can't seem to figure …

Member Avatar for sirlink99
0
3K
Member Avatar for mangopearapples

Hi, for some reason, my JScrollPane isn't working with mt JTextArea. Probably the most important part: [CODE] JTextArea TextArea; JScrollPane scroll; TextArea = new JTextArea(); scroll = new JScrollPane(TextArea); add(TextArea,BorderLayout.CENTER); add(scroll,BorderLayout.LINE_START);[/CODE] Whole code if you're interested in what I'm making: [CODE]import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.BufferedWriter; …

Member Avatar for mangopearapples
0
275
Member Avatar for insanely_sane

Hey guys. I'm brushing up on my GUI programming in Java and I am using the Ready to program IDE(by holtsoft). So the title tells it all really. I have tried and failed, but I need to see if there is a way to get the typewriter effect (as in, …

Member Avatar for ztini
0
163
Member Avatar for Buffalo101

Hello, I have a jTextArea I want to use as an accounts panel by an administrator. The admin can append user + " " + password + " \n" to the jTextArea (one line per user + password). When someone tries to log in, the idea is to iterate through …

Member Avatar for Buffalo101
0
183
Member Avatar for gingerfish

is it possible to write a text in a different font and color in one textarea ??:?: thanks in advance ^^

Member Avatar for jwenting
0
86
Member Avatar for feoperro

Hi, I would like to know if it's possible to edit specific rows from inside a textarea in a java swing application. So if I had a text area that held the following content: Row1 Row2 Row3 And I had a command like this: jTextArea1.getText().row[2].setText("New Row2"); Then I would want …

Member Avatar for peter_budo
0
121

The End.