0
프레임을 JWindow
(X 및 - 버튼을 처리하고 싶기 때문에)에서 확장하고 있으므로 장식하고 싶지 않습니다. 내 문제는 응용 프로그램을 실행할 때 내 창을 끌 수 없다는 것입니다. 특정 위치에서 고정되어 있습니다.JWindow의 윈도우가 움직이지 않는다.
공용 클래스 StatisticsMainFrame이 JWindow의 {
public StatisticsMainFrame()
{
bodyPane = new JPanel();
bodyPane.setLayout(new BoxLayout(bodyPane, BoxLayout.X_AXIS));
sideBannerPane = new JPanel(); // program banner
buttonsPane = new JPanel(); // contains buttons
contentPane = new JPanel();
contentPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
contentPane.setPreferredSize(new Dimension(500,500));
// contentPane contains some panel for display data
Container container = new Container();
container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));
container.add(Box.createVerticalGlue());
container.add(sideBannerPane);
container.add(buttonsPane);
container.add(contentPane);
Container cont = new Container();
cont.setLayout(new BoxLayout(cont, BoxLayout.Y_AXIS));
//cont.add(Box.createHorizontalGlue());
//cont.add(custDecorationPane);
cont.add(container);
add(cont);
// Adding Panes
setAlwaysOnTop(true);
//setUndecorated(true);
pack();
}
public static void main(String[] arg)
{
new StatisticsMainFrame().setVisible(true);
}
private CustomFrameDecorationButtons custDecorationPane;
private JPanel bodyPane;
private JPanel contentPane;
private JPanel sideBannerPane;
private JPanel buttonsPane;
// buttonsPane components
private JLabel general_lbl;
private JLabel Diagnosis_lbl;
private JLabel chemotherapy_lbl;
private JLabel radiotherapy_lbl;
private JLabel surgery_lbl;
private JLabel hermonalTherapy_lbl;
private RootButton generalStatistics_btn;
private RootButton statOfAffectedSys_btn;
private RootButton statOfGrade_btn;
private RootButton statOfCombinations_btn;
private RootButton statOfResponses_btn;
private RootButton statOfRadiotherapy_btn;
private RootButton statOfSurgery_btn;
private RootButton statOfHermonaltherapy_btn;
private GeneralStatisticsContentPanel generalStatPane;
private StatisticsOfAffectedSystemPanel2 statOfAffectedSysPanel2;
private StatisticsOfGradePanel statOFGradingPanel;
private ChemotherapyCombinationStatisticsPanel statChemotherapyCombinationPanel;
private ChemotherapyResponseStatisticsPanel statChemotherapyResponsePanel;
private RadiotherapyStatisticsPanel radiotherapyPanel;
private SurgeryStatisticsPanel surgeryStatPanel;
private HermonaltherapyStatisticsPanel hermonaltherapy;
}을 확장 당신은 예제에 대한 사용하여 사용자 정의 드래그를 추가 할 수 있습니다
코드에서'JWindow'를 볼 수 없습니다. [SSCCE] (http://pscode.org/sscce.html)를 게시 하시겠습니까? – Howard
thnx asif ... 실제로 나는이 일을하지만 때로는 부적절한 답변을 .. 어쨌든 thnx .. – BDeveloper
나는 내 코드를 지금 업데이트했습니다. – BDeveloper