0
public class AplotPdfPrintLocal extends ApplicationWindow {
private String userSelectedFile;
public AplotPdfPrintLocal(String pdfFilePath) {
super(null);
this.userSelectedFile = pdfFilePath;
}
public void run() {
setBlockOnOpen(true);
open();
Display.getCurrent().dispose();
}
etc........
我想從B類執行上面的類我如何從B級執行A類的run方法
的方法是B級 - 低於
public void startPDFPrint() throws Exception {
AplotPdfPrintLocal pdfPrint = new AplotPdfPrintLocal(getPDFFileName()).run();
}
我得到一個錯誤我需要將運行的返回類型從void改爲plotPdfPrintLocal
我是否在調用類錯誤?