-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.0
-
x86
-
generic
AWTEventMulticaster.java:171)
at java.awt.Component.processFocusEvent(Component.java:4064)
at java.awt.Component.processEvent(Component.java:3954)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:667)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:463)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:96)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
===================
Here is the code for jTextArea.java
-----------------------------------
/* Copyright (c) Sun Microsystems 1999
$Header: /home/sun/src/JDK1.2/jTextArea.java,v 1.20 2000/03/30 14:59:14 isam Exp $
*/
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.*;
public class jTextArea extends JApplet
{
public void init()
{
jTextArea1 jTextComponent2 = new jTextArea1();
getContentPane().add(jTextComponent2);
}
public static void main(String[] args)
{
JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
frame.setContentPane(new jTextArea1());
frame.pack();
frame.setVisible(true);
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit(0);
}
});
}
}
class jTextArea1 extends JPanel
{
public jTextArea1()
{
JLabel l;
JPanel p;
JTextArea area;
JTextPane pane;
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
p = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
l = new JLabel("JTA1");
l.setVerticalAlignment(SwingConstants.BOTTOM);
area = new JTextArea(10,30);
area.setEditable(true);
area.setFont(new Font("Lucida Sans Regular", Font.PLAIN, 9));
area.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd");
area.setLineWrap(true);
p.add(l);
p.add(area);
p.setPreferredSize(new Dimension(375,310));
panel.add(p);
panel.setPreferredSize(new Dimension(400,400));
JScrollPane scroll = new JScrollPane(panel);
scroll.setPreferredSize(new Dimension(420,450));
add(scroll);
}
}
-----------------------------------
WorkAround:
======================================================================
Name: jbT81659 Date: 10/29/2000
JDK1.4.0-B38, JTextArea throws exceptions after it is executed under
Solaris Sparc 8. The following error is displayed at time of execution and while working in JTextArea:
===================
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.paint(BoxView.java:383)
at javax.swing.text.ParagraphView.paint(ParagraphView.java:568)
at javax.swing.text.BoxView.paintChild(BoxView.java:130)
at javax.swing.text.BoxView.paint(BoxView.java:394)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1221)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:543)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:677)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:656)
at javax.swing.JComponent.paintComponent(JComponent.java:430)
at javax.swing.JComponent.paint(JComponent.java:689)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paint(JComponent.java:698)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paint(JComponent.java:698)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4257)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4203)
at javax.swing.JComponent._paintImmediately(JComponent.java:4155)
at javax.swing.JComponent.paintImmediately(JComponent.java:3987)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:399)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:120)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:934)
at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:913)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:934)
at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:913)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:813)
at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:975)
at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:651)
at javax.swing.text.DefaultCaret.focusLost(DefaultCaret.java:267)
at javax.swing.text.DefaultCaret$FocusHandler.focusLost(DefaultCaret.java:1150)
at java.awt.AWTEventMulticaster.focusLost(
at java.awt.Component.processFocusEvent(Component.java:4064)
at java.awt.Component.processEvent(Component.java:3954)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:667)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:463)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:96)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
===================
Here is the code for jTextArea.java
-----------------------------------
/* Copyright (c) Sun Microsystems 1999
$Header: /home/sun/src/JDK1.2/jTextArea.java,v 1.20 2000/03/30 14:59:14 isam Exp $
*/
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.*;
public class jTextArea extends JApplet
{
public void init()
{
jTextArea1 jTextComponent2 = new jTextArea1();
getContentPane().add(jTextComponent2);
}
public static void main(String[] args)
{
JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
frame.setContentPane(new jTextArea1());
frame.pack();
frame.setVisible(true);
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit(0);
}
});
}
}
class jTextArea1 extends JPanel
{
public jTextArea1()
{
JLabel l;
JPanel p;
JTextArea area;
JTextPane pane;
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
p = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
l = new JLabel("JTA1");
l.setVerticalAlignment(SwingConstants.BOTTOM);
area = new JTextArea(10,30);
area.setEditable(true);
area.setFont(new Font("Lucida Sans Regular", Font.PLAIN, 9));
area.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd");
area.setLineWrap(true);
p.add(l);
p.add(area);
p.setPreferredSize(new Dimension(375,310));
panel.add(p);
panel.setPreferredSize(new Dimension(400,400));
JScrollPane scroll = new JScrollPane(panel);
scroll.setPreferredSize(new Dimension(420,450));
add(scroll);
}
}
-----------------------------------
WorkAround:
======================================================================
Name: jbT81659 Date: 10/29/2000
JDK1.4.0-B38, JTextArea throws exceptions after it is executed under
Solaris Sparc 8. The following error is displayed at time of execution and while working in JTextArea:
===================
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.paint(BoxView.java:383)
at javax.swing.text.ParagraphView.paint(ParagraphView.java:568)
at javax.swing.text.BoxView.paintChild(BoxView.java:130)
at javax.swing.text.BoxView.paint(BoxView.java:394)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1221)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:543)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:677)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:656)
at javax.swing.JComponent.paintComponent(JComponent.java:430)
at javax.swing.JComponent.paint(JComponent.java:689)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paint(JComponent.java:698)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paint(JComponent.java:698)
at javax.swing.JComponent.paintChildren(JComponent.java:536)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4257)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4203)
at javax.swing.JComponent._paintImmediately(JComponent.java:4155)
at javax.swing.JComponent.paintImmediately(JComponent.java:3987)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:399)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:120)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:934)
at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:913)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:934)
at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:913)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.Dialog.show(Dialog.java:403)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:792)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:607)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:579)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2011)
at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2137)
at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:698)
at javax.swing.text.JTextComponent.paste(JTextComponent.java:1054)
at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(DefaultEditorKit.java:1166)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1496)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2173)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2208)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2126)
at java.awt.Component.processEvent(Component.java:3975)
at java.awt.Container.processEvent(Container.java:1247)
at java.awt.Component.dispatchEventImpl(Component.java:2892)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1437)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:631)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:548)
at java.awt.Component.dispatchEventImpl(Component.java:2783)
at java.awt.Container.dispatchEventImpl(Container.java:1309)
at java.awt.Window.dispatchEventImpl(Window.java:1228)
at java.awt.Component.dispatchEvent(Component.java:2764)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:423)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: range 50 to 123 is invalid for paragraph of length 73
at java.text.Bidi.createLineBidi(Bidi.java:259)
at java.awt.font.TextMeasurer.makeTextLineOnRange(TextMeasurer.java:439)
at java.awt.font.TextMeasurer.getLayout(TextMeasurer.java:566)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
at javax.swing.text.TextLayoutStrategy.createView(TextLayoutStrategy.java:199)
at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:438)
at javax.swing.text.TextLayoutStrategy.layoutRow(TextLayoutStrategy.java:111)
at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:394)
at javax.swing.text.TextLayoutStrategy.layout(TextLayoutStrategy.java:94)
at javax.swing.text.FlowView.setSize(FlowView.java:183)
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.setSize(BasicTextAreaUI.java:207)
at javax.swing.text.BoxView.modelToView(BoxView.java:443)
at javax.swing.text.CompositeView.modelToView(CompositeView.java:242)
at javax.swing.text.BoxView.modelToView(BoxView.java:445)
at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1296)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:838)
at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:813)
at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:975)
at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:651)
at javax.swing.text.DefaultCaret.focusLost(DefaultCaret.java:267)
at javax.swing.text.DefaultCaret$FocusHandler.focusLost(DefaultCaret.java:1150)
at java.awt.AWTEventMulticaster.focusLost(