[英]The program 'java.ori' received an X Window System error
我在Ubuntu 11.10上有一個桌面應用程序,我已經實現了一個功能,當任何用戶點擊一個特定按鈕時,會打開一個輸入對話框並要求用戶輸入。
public void actionPerformed(ActionEvent e) {
//Shows a input dialog asking the template ID to verify
String id = JOptionPane.showInputDialog(rootPane,
"Enter the Enrolled ID to verify.", "Verify",
JOptionPane.QUESTION_MESSAGE);
}
因此用戶填寫值並單擊“確定”按鈕甚至嘗試關閉對話框應用程序獲取錯誤並崩潰。
錯誤:
The program 'java.ori' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 2262 error_code 3 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
誰能幫我解決這個問題? 提前致謝。
我相信,rootPane不適合作為JDialog的父級,它將由JOptionPane顯示。 它應該是JFrame或其他JDialog。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.