Results 1 to 5 of 5
- 08-21-2009, 02:54 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 29
- Rep Power
- 0
-
You may wish to try to isolate the minimal code required to demonstrate the problem and the precise conditions as well. I'd also search the Java bug database to see if it's been reported. If not, and others can reproduce the problem, you may wish to report a bug yourself.
- 08-22-2009, 06:36 AM #3
Member
- Join Date
- Apr 2009
- Posts
- 29
- Rep Power
- 0
Hi ,
Please find below the code snippet to reproduce the problem.
I have set textarea editable property to true.Java Code:import java.awt.Dimension; import javax.swing.*; public class Test{ public JPanel createContentPane (){ JPanel totalGUI = new JPanel(); // This is the text to be stored in Jtextarea. String story = "Testing JtextArea Text\n\n"+ "data gets corrupted when there is huge amount of data\n\n"+ "The Internet Foundation Classes (IFC) were a graphics \n\n"+ "library for Java originally developed by Netscape Communications\n "+ "Corporation and first released on December 16, 1996.\n\n"+ "On April 2, 1997, Sun Microsystems and Netscape Communications\n"+ " Corporation announced their intention to combine IFC with other\n"+ " technologies to form the Java Foundation Classes. In addition \n"+ "to the components originally provided by IFC, Swing introduced \n"+ "a mechanism that allowed the look and feel of every component \n"+ "in an application to be altered without making substantial \n"+ "changes to the application code. The introduction of support \n"+ "for a pluggable look and feel allowed Swing components to \n"+ "emulate the appearance of native components while still \n"+ "retaining the benefits of platform independence. This feature \n"+ "also makes it easy to have an individual application's appearance \n"+ "look very different from other native programs.\n\n"+ "Originally distributed as a separately downloadable library, \n"+ "Swing has been included as part of the Java Standard Edition \n"+ "since release 1.2. The Swing classes are contained in the \n"+ "javax.swing package hierarchy.\n"; // We create the TextArea and pass the textarea in as an argument. JTextArea storyArea = new JTextArea(story); /*setEditable is set to true so that we can add more text into it for testing*/ storyArea.setEditable(true); storyArea.setLineWrap(true); storyArea.setWrapStyleWord(true); /* We create the ScrollPane and instantiate it with the TextArea as an argument*/ // along with two constants that define the behaviour of the scrollbars. JScrollPane area = new JScrollPane(storyArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); // We then set the preferred size of the scrollpane. area.setPreferredSize(new Dimension(300, 200)); // and add it to the GUI. totalGUI.add(area); totalGUI.setOpaque(true); return totalGUI; } private static void createAndShowGUI() { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("[=] Embrace of the JScrollPane [=]"); Test demo = new Test(); frame.setContentPane(demo.createContentPane()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(350, 300); frame.setVisible(true); } public static void main(String[] args) { //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } }
So to reproduce the problem run above program on Solaris System and then copy the text in story string around 50 times in textArea.The data will be corrupt.
Thanks,
Simmi
- 08-24-2009, 07:36 AM #4
Member
- Join Date
- Apr 2009
- Posts
- 29
- Rep Power
- 0
Hi,
Any get back on this.
Thanks,
simmi
- 08-25-2009, 09:34 AM #5
Member
- Join Date
- Apr 2009
- Posts
- 29
- Rep Power
- 0
Similar Threads
-
data structure and data base??
By ahmed13 in forum Advanced JavaReplies: 8Last Post: 03-27-2009, 05:48 AM -
how to store the data in data base
By eclipse3.4ide in forum New To JavaReplies: 5Last Post: 02-03-2009, 04:25 AM -
error while retrieving data from data base
By kirtesh4u in forum New To JavaReplies: 5Last Post: 11-15-2008, 04:10 PM -
Data Pipeline 2 - Data Transformation Toolkit for Java Released
By dele in forum Java SoftwareReplies: 0Last Post: 10-31-2008, 02:13 PM -
Data Sorting in a .data file using java
By stutiger99 in forum New To JavaReplies: 2Last Post: 10-08-2008, 02:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks