
如圖,我想用Python的jpype模塊運行一個Java圖形界面,怎么都不行,最后救治搞了一個空殼的jframe,還是報這個錯誤,所以急需幫助,可加我QQ3037860956,有償,只要能運行一個白板的jframe就可
uj5u.com熱心網友回復:
貼出代碼等大佬是比較好的辦法uj5u.com熱心網友回復:
把Java圖形界面的原始碼各種調整都不行,應該不是代碼的問題1.
import javax.swing.JFrame;
public class JFrame1 extends JFrame{
private JFrame jFrame = new JFrame();
public JFrame1(){
jFrame.setBounds(0,0,1250,600);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//
//jFrame.setLayout(new FlowLayout());//
jFrame.setVisible(true);//
}
public static void main(String[] args){
JFrame1 jf1=new JFrame1();
//jf1.setTitle("jf");
}
}
2.
import javax.swing.JFrame;
public class Ce3 extends JFrame{
//private JFrame jFrame = new JFrame();
public Ce3(){
JFrame jFrame = new JFrame();
jFrame.setBounds(0,0,1250,600);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//
//jFrame.setLayout(new FlowLayout());//
jFrame.setVisible(true);//
}
public static void main(String[] args){
Ce3 ce3=new Ce3();
}
}這些都不行
uj5u.com熱心網友回復:
import javax.swing.JFrame;public class Ce5{
//private JFrame jFrame = new JFrame();
public Ce5(){
}
public void createJFrame(){
JFrame jFrame = new JFrame();
jFrame.setBounds(0,0,1250,600);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//
//jFrame.setLayout(new FlowLayout());//
jFrame.setVisible(true);//
}
public static void main(String[] args){
Ce5 ce4=new Ce5();
ce4.createJFrame();
}
}都不行
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/51223.html
上一篇:Notepade++請教大佬:怎么實作這個段落的代碼折疊
下一篇:如何解決有有層級的最短路徑問題?
