我想Report
在JFrame
不使用该show()
方法的情况下显示我的。
我不想有这个弹出框,我只想在JFrame
.
这是目前的情况:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
JasperReportBuilder jrb = new JasperReportBuilder();
int iFontsizeStringI = (Integer) jSpinner1.getValue();
int iFontsizeStringII= (Integer) jSpinner2.getValue();
String sPageSize =(String)jComboBox1.getSelectedItem();
String sPageOrientation = (String)jComboBox2.getSelectedItem();
String one = jTextField1.getText();
String two = jTextField2.getText();
FontBuilder fontI = stl.font("Courier New", true, false, iFontsizeStringI);
FontBuilder fontII = stl.font("Courier New", true, false, iFontsizeStringII);
if(sPageOrientation.equalsIgnoreCase("Landscape") && sPageSize.equalsIgnoreCase("A4"))
jrb.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);
if(sPageOrientation.equalsIgnoreCase("Landscape") && sPageSize.equalsIgnoreCase("A3"))
jrb.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);
if(sPageOrientation.equalsIgnoreCase("Portrait") && sPageSize.equalsIgnoreCase("A3"))
jrb.setPageFormat(PageType.A3, PageOrientation.PORTRAIT);
jrb.title(cmp.verticalList(cmp.text(one).setStyle(stl.style().setBorder(stl.penDouble()).setFont(fontI)
.setHorizontalAlignment(HorizontalAlignment.CENTER)),cmp.text(two).setStyle(stl.style()
.setFont(fontII).setHorizontalAlignment(HorizontalAlignment.CENTER).setBorder(stl.penDouble()))));
try {
jrb.show(false);
} catch (DRException ex) {
Exceptions.printStackTrace(ex);
}
}
我必须改变什么才能让我在 a 中显示这个JFrame
?什么时候可以没有任何jrxml
文件?