aspose file tools*
The moose likes Applets and the fly likes Applet acting strange under JRE 1.4x Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet acting strange under JRE 1.4x" Watch "Applet acting strange under JRE 1.4x" New topic
Author

Applet acting strange under JRE 1.4x

Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
Hi,
I wrote an Applet that uses Swing and acts as a permissions utility for our company's backend. Basically, it's a JTable with it's cells overloaded to show JCheckBoxes. I developed it using JRE 1.3.1_06, however when I run it on machines that have JRE 1.4x, I get StackOverflowException. Never got this error under JRE 1.3.1_06. Isn't JRE versions in Java downward compatible so that if I run an Applet under older version it should run under new version as well?
Exception:
----------------------------------------
StackOverFlowException:
AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:42)
AttributiveCellTableModel.setDataVector(AttributiveCellTableModel.java:43)
----------------------------------------
Here is part of code:
---------------------
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
public class AttributiveCellTableModel extends DefaultTableModel {
protected CellAttribute cellAtt;
public AttributiveCellTableModel() {
this((Vector)null, 0);
}
public AttributiveCellTableModel(int numRows, int numColumns) {
Vector names = new Vector(numColumns);
names.setSize(numColumns);
setColumnIdentifiers(names);
dataVector = new Vector();
setNumRows(numRows);
cellAtt = new DefaultCellAttribute(numRows,numColumns);
}
public AttributiveCellTableModel(Vector columnNames, int numRows) {
setColumnIdentifiers(columnNames);
dataVector = new Vector();
setNumRows(numRows);
cellAtt = new DefaultCellAttribute(numRows,columnNames.size());
}
public AttributiveCellTableModel(Object[] columnNames, int numRows) {
this(convertToVector(columnNames), numRows);
}
public AttributiveCellTableModel(Vector data, Vector columnNames) {
setDataVector(data, columnNames);
}
public AttributiveCellTableModel(Object[][] data, Object[] columnNames) {
setDataVector(data, columnNames);
}

public void setDataVector(Vector newData, Vector columnNames) {
if (newData == null)
throw new IllegalArgumentException("setDataVector() - Null parameter");
dataVector = new Vector(); <---- line 42
setColumnIdentifiers(columnNames); <---- line 43
dataVector = newData;
//
cellAtt = new DefaultCellAttribute(dataVector.size(),
columnIdentifiers.size());
newRowsAdded(new TableModelEvent(this, 0, getRowCount()-1,
TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
}
---------------------
thanks,
Alex


All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Does this help:
http://developer.java.sun.com/developer/bugParade/bugs/4515170.html


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
ok, but what's the solution?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet acting strange under JRE 1.4x
 
Similar Threads
Need Help in Modification MultiRowHeaderExample
jtable
Need Help in Modification MultiRowHeaderExample
How to have JTable with cells spanning on multiple columns?
Merge Cells of Jtable