Recent FAQ for Java Spreadsheet

JDataGrid is a pure Java Spreadsheet component, it has many features, it looks like Excel, the following is the questions that the developers often ask, it will help you understand and use the JDataGrid quickly.

Q:How to enable multiple in cell?
A:Sets the cell to String.class:
dataGridModel.setCellClass(String.class, 3, 5); then enable multiple line:

Q:How to click once, then enter edit mode?
A:dataGrid.putClientProperty(“JDataGrid.clickCountToStartsEdit”, 1);

Q:How to set the JDataGrid window size?

bean.getFrame(true).setPreferredSize(new Dimension(480,320));


Q:How to disable the save/cancel dialog after close the JDataGrid window?
A:Override the JDataGridBean.doClose method,add your logic, then getFrame().dispose() method.

Q:How to set the freeze window on code?

Q:How to get the menu on the top?

JMenu menuwindow =(JMenu) menubar.getMenu(6);


Q:How to add license data?
A: LicenseManager.getInstance().addLicenseData(registercode);

Q:How to get selected cells of JDataGrid?
A:Cell[]  cells = getDataGrid().getSelectedCells();
Cell   c =  getDataGrid().getSelectedCell();

Q:How to hide the default menu bar of JDataGrid?
A:JMenuBar menubar = dataGrid.getMenuBar(JDataGridBean.MAIN_MENUBAR);

Q:Have the JDataGrid auto increment the row or column count when click the scrollbar?

A:Set the following property to enable this feature:

Q:Is the maximum row and column count of JDataGrid?
A:In theory, the JDataGrid support maximum 2^32 row or column count, on the bank or securities project, they always use the LargeDataGridModel, it have better performance for large data.