Java 将TableViewer数据保存到属性文件中
如何将Java 将TableViewer数据保存到属性文件中,java,swt,jface,tableviewer,Java,Swt,Jface,Tableviewer,如何将TableViewer数据保存到属性文件中,并在重新打开TableViewer时填充相同的数据 private void buildWellBoreDate( NearWellBoreModellingData nearWellBoreModellingData, Properties p) { List<DownholeComplexityTable> downhole=modelProviderDownholeComplexi
TableViewer
数据保存到属性文件中,并在重新打开TableViewer
时填充相同的数据
private void buildWellBoreDate(
NearWellBoreModellingData nearWellBoreModellingData, Properties p) {
List<DownholeComplexityTable> downhole=modelProviderDownholeComplexityTable.INSTANCE.getDownholeComplexityTables();
for(int i=0;i<downhole.size();i++){
p.setProperty("row"+i+"."+"NameofZones",((DownholeComplexityTable)downhole).getNameOfZones());
}
String fieldNameWell = nearWellBoreModellingData.getFieldNameWell();
if (fieldNameWell != null) {
p.setProperty(KEY_FIELDNAME_NEARWELL, fieldNameWell);
}
while trying this way I am able to save the textfield data but getting error for the table java.lang.ClassCastException:
private void buildWellBoreDate(
近井井筒建模数据近井井筒建模数据,属性p){
List=modelProviderDownholeComplexityTable.INSTANCE.getDownholeComplexityTables();
对于(int i=0;i为什么不使用SQLite数据库?似乎是更合适的选择。您自己尝试过任何我们可以帮助的东西吗?通常,如果您能够显示您尝试过的内容以及遇到的问题,您得到的响应将更有帮助。感谢您的响应。但是项目要求在fil中添加表值e类似于行1,然后是值1,值2