我有一个JFrame(HMSDoctor)
,我JInternalFrame(CurrentOPD)
用它来呼叫一个JDesktopPane
.
//opening JInternalFrame(CurrentOPD) by using JDesktopPane in JFrame(HMSDoctor).
JDesktopPane jdp=new JDesktopPane();
jdp.add(new CurrentOPD);
//Above code display proper JInternalFrame.
Run Code Online (Sandbox Code Playgroud)
当我关闭那个JInternalFrame时,我想执行另一个JInternalFrame(Follow)JFrame(HMSDoctor)
.
我怎么能这样做?
我可以JOptionPane.showConfirmDialog
用来展示JInternalFrame
吗?
我试过以下代码:
OPD.Registration opdRegister = new OPD.Registration();
//OPD.Registration is extending JInternalFrame
int ns=JOptionPane.showConfirmDialog(null, opdRegister, "Billing", JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE);
// i am trying to call opdregister in this Confirm Dialog Box.
Run Code Online (Sandbox Code Playgroud)
通过使用上面的代码显示对话框JInternalFrame
但不显示正确.它只显示标题栏.其他数据是从JInternalFrame
.
如何增加此对话框的大小?
我怎样才能改变color
的String
在Message Box
?
String patientname="ABC";
JOptionPane.showMessageDialog(null, "Patient "+patientname+" Already Assigned");
Run Code Online (Sandbox Code Playgroud)
在上面的代码我想改变颜色patientname
.