Debug help window
This commit is contained in:
parent
84f55b6ca4
commit
c13aa279af
@ -2,7 +2,7 @@ package lsystem.screen.main;
|
|||||||
|
|
||||||
|
|
||||||
import lsystem.screen.Constants;
|
import lsystem.screen.Constants;
|
||||||
|
import java.awt.event.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ public class MainFrame extends JFrame {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -7898079642230075807L;
|
private static final long serialVersionUID = -7898079642230075807L;
|
||||||
private int nbTabs;
|
private int nbTabs;
|
||||||
private int nbHelpWindow;
|
boolean helpWindow = false;
|
||||||
private JPanel basePanel;
|
private JPanel basePanel;
|
||||||
private JTabbedPane tabs;
|
private JTabbedPane tabs;
|
||||||
private JButton newGen;
|
private JButton newGen;
|
||||||
@ -46,13 +46,14 @@ public class MainFrame extends JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void newHelp() {
|
public void newHelp() {
|
||||||
if(nbHelpWindow>0){
|
if(helpWindow != false){
|
||||||
JOptionPane.showMessageDialog(null, "Une fenêtre d'aide est déjà ouverte.");
|
JOptionPane.showMessageDialog(null, "Une fenêtre d'aide est déjà ouverte.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nbHelpWindow++;
|
helpWindow = true;
|
||||||
|
|
||||||
JFrame aide = new JFrame();
|
JFrame aide = new JFrame();
|
||||||
|
|
||||||
aide.setTitle("Aide");
|
aide.setTitle("Aide");
|
||||||
aide.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
aide.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||||
aide.setSize(700,500);
|
aide.setSize(700,500);
|
||||||
@ -68,6 +69,12 @@ public class MainFrame extends JFrame {
|
|||||||
scrollbar.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
scrollbar.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
||||||
|
|
||||||
aide.add(scrollbar);
|
aide.add(scrollbar);
|
||||||
|
|
||||||
|
aide.addWindowListener(new WindowAdapter() {
|
||||||
|
public void windowClosed(WindowEvent e) {
|
||||||
|
helpWindow = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void newTab() {
|
public void newTab() {
|
||||||
|
Loading…
Reference in New Issue
Block a user