1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
| package lika;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.DebugGraphics;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.ListModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.LineBorder;
import javax.swing.border.SoftBevelBorder;
/**
*
* @author zangaloni
*/
public class Fenetre extends JFrame{
private static final long serialVersionUID = 1L;
private JMenuBar jMenuBar1;
private JMenuItem jMenuItem6;
private JMenuItem jMenuItem5;
private JMenuItem jMenuItem4;
private JMenu jMenu5;
private JButton jButton4;
private JButton jButton3;
private JButton jButton2;
private JButton jButton1;
private JLabel jLabel1;
private JMenuItem jMenuItem9;
private JMenuItem jMenuItem10;
private JMenuItem jMenuItem8;
private JMenuItem jMenuItem7;
private JMenuItem jMenuItem3;
private JMenuItem jMenuItem2;
private JMenuItem jMenuItem1;
private JMenu jMenu4;
private JMenu jMenu3;
private JMenu jMenu2;
private JMenu jMenu1;
public JPanel cards=new JPanel();
private JPanel pan=new JPanel();
public Fenetre() {
getContentPane().setLayout(new CardLayout());
getContentPane().add(pan,"Fenetre");
this.setSize(890, 664);
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
this.setLocationRelativeTo(null);
this.setVisible(true);
pan.setForeground(new java.awt.Color(255, 255, 255));
pan.setBackground(new java.awt.Color(192, 192, 192));
BorderLayout thisLayout = new BorderLayout();
pan.setLayout(thisLayout);
this.setTitle("SDL\n");
jButton1 = new JButton();
jButton1.setText("Quitter");
jButton1.setBackground(new java.awt.Color(0, 0, 0));
jButton1.setFont(new java.awt.Font("Bookman Old Style", 3, 18));
jButton1.setForeground(new java.awt.Color(255, 0, 0));
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.exit(0);
}
});
jLabel1 = new JLabel();
pan.add(jButton1, BorderLayout.SOUTH);
jButton1.setBounds(0, 257, 514, 37);
jButton1.setPreferredSize(new Dimension(376, 54));
jButton1.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, new Color(0, 0, 0)));
jButton2 = new JButton();
pan.add(jButton2, BorderLayout.WEST);
jButton2.setText("S.Arb.");
jButton2.setPreferredSize(new Dimension(116, 145));
jButton2.setBackground(new Color(0, 0, 0));
jButton2.setFont(new java.awt.Font("Amethyst", 1, 28));
jButton2.setForeground(new Color(255, 0, 0));
jButton2.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, new Color(0, 0, 0)));
jButton4 = new JButton();
pan.add(jButton4, BorderLayout.EAST);
jButton4.setText("Graphes");
jButton4.setPreferredSize(new Dimension(125, 113));
jButton4.setBackground(new Color(0, 0, 0));
jButton4.setForeground(new Color(255, 0, 0));
jButton4.setFont(new Font("Amethyst", 1, 28));
jButton4.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, new Color(0, 0, 0)));
jButton3 = new JButton();
pan.add(jButton3, BorderLayout.CENTER);
pan.add(jLabel1, BorderLayout.NORTH);
jButton3.setText("S.Lin.");
jButton3.setPreferredSize(new Dimension(376, 125));
jButton3.setFont(new java.awt.Font("Amethyst", 1, 28));
jButton3.setForeground(new Color(255, 0, 0));
jButton3.setBackground(new Color(0, 0, 0));
jButton3.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, new Color(0, 0, 0)));
jButton3.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
getContentPane().add(new Slinpanel().getpanel(),"slin");
CardLayout cl = (CardLayout)(getContentPane().getLayout());
cl.show(getContentPane(), "slin");
}
}
);
jLabel1.setText(" Bienvenue ...");
jLabel1.setFont(new java.awt.Font("Detente", 1, 48));
jLabel1.setBackground(new java.awt.Color(128, 128, 128));
jLabel1.setForeground(new java.awt.Color(0, 0, 0));
jLabel1.setBounds(0, 0, 430, 70);
jLabel1.setPreferredSize(new Dimension(430, 70));
//jLabel1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("lika/logo.gif")));
jLabel1.setIconTextGap(6);
jLabel1.setLocation(new java.awt.Point(1, 0));
jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
jLabel1.setDebugGraphicsOptions(DebugGraphics.BUFFERED_OPTION);
jLabel1.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
jMenuBar1 = new JMenuBar();
setJMenuBar(jMenuBar1);
jMenuBar1.setBackground(new Color(0, 0, 0));
jMenu1 = new JMenu();
jMenuBar1.add(jMenu1);
jMenu1.setText("Algorithmes");
jMenu1.setFont(new Font("Bookman Old Style", 3, 14));
jMenu1.setForeground(new Color(255, 0, 0));
jMenu2 = new JMenu();
jMenu1.add(jMenu2);
jMenu2.setText("Structures Linéaires");
jMenu2.setBackground(new Color(0, 0, 0));
jMenu2.setFont(new Font("Bookman Old Style", 3, 14));
jMenu2.setForeground(new Color(255, 0, 0));
jMenuItem7 = new JMenuItem();
jMenu2.add(jMenuItem7);
jMenuItem7.setText("Tableaux");
jMenuItem7.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem7.setBackground(new Color(255, 0, 0));
jMenuItem8 = new JMenuItem();
jMenu2.add(jMenuItem8);
jMenuItem8.setText("Listes");
jMenuItem8.setBackground(new Color(255, 0, 0));
jMenuItem8.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem9 = new JMenuItem();
jMenu2.add(jMenuItem9);
jMenuItem9.setText("Piles");
jMenuItem9.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem9.setBackground(new Color(255, 0, 0));
jMenuItem10 = new JMenuItem();
jMenu2.add(jMenuItem10);
jMenuItem10.setText("Files");
jMenuItem10.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem10.setBackground(new Color(255, 0, 0));
jMenuItem1 = new JMenuItem();
jMenu1.add(jMenuItem1);
jMenuItem1.setText("Structures Arborescentes");
jMenuItem1.setBackground(new Color(0, 0, 0));
jMenuItem1.setForeground(new Color(255, 0, 0));
jMenuItem1.setFont(new Font("Bookman Old Style", 3, 14));
jMenuItem2 = new JMenuItem();
jMenu1.add(jMenuItem2);
jMenuItem2.setText("Graphes");
jMenuItem2.setBackground(new Color(0, 0, 0));
jMenuItem2.setForeground(new Color(255, 0, 0));
jMenuItem2.setFont(new Font("Bookman Old Style", 3, 14));
jMenu3 = new JMenu();
jMenuBar1.add(jMenu3);
jMenu3.setText("Cours");
jMenu3.setForeground(new Color(255, 0, 0));
jMenu3.setFont(new Font("Bookman Old Style", 3, 14));
jMenu3.setBackground(new Color(0, 0, 0));
jMenu3.setOpaque(false);
jMenu3.setToolTipText("Besoin d'aide ?");
jMenu4 = new JMenu();
jMenuBar1.add(jMenu4);
jMenu4.setText("?");
jMenu4.setForeground(new Color(255, 0, 0));
jMenu4.setFont(new Font("Bookman Old Style", 3, 14));
jMenuItem3 = new JMenuItem();
jMenu4.add(jMenuItem3);
jMenuItem3.setText("Aide");
jMenuItem3.setBackground(new Color(0, 0, 0));
jMenuItem3.setForeground(new Color(255, 0, 0));
jMenuItem3.setFont(new Font("Bookman Old Style", 3, 14));
jMenu5 = new JMenu();
jMenu4.add(jMenu5);
jMenu5.setText("A propos");
jMenu5.setBackground(new Color(0, 0, 0));
jMenu5.setForeground(new Color(255, 0, 0));
jMenu5.setFont(new Font("Bookman Old Style", 3, 14));
jMenuItem4 = new JMenuItem();
jMenu5.add(jMenuItem4);
jMenuItem4.setText("SDL");
jMenuItem4.setBackground(new Color(255, 0, 0));
jMenuItem4.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
cards.add(new Sdlpanel().getpanel(),"sdl");
CardLayout cl = (CardLayout)(getContentPane().getLayout());
//cl.next(frm.getContentPane());
cl.show(getContentPane(), "sdl");
/*pan.removeAll();
pan.add(new Sdlpanel().getpanel());
pan.revalidate();
*/ }
}
);
jMenuItem5 = new JMenuItem();
jMenu5.add(jMenuItem5);
jMenuItem5.setText("Auteurs");
jMenuItem5.setBackground(new Color(255, 0, 0));
jMenuItem5.setFont(new Font("Bookman Old Style", 2, 14));
jMenuItem5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Auteurs inst = new Auteurs();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
});
jMenuItem6 = new JMenuItem();
jMenu5.add(jMenuItem6);
jMenuItem6.setText("References");
jMenuItem6.setBackground(new Color(255, 0, 0));
jMenuItem6.setFont(new Font("Bookman Old Style", 2, 14));
}
public class Slinpanel {
JPanel slin=new JPanel();
private JList jList1;
private JButton jButton1;
private JLabel jLabel2;
private JButton jButton2;
private JLabel jLabel1;
public JPanel getpanel(){
return this.slin;
}
public Slinpanel(){
try {
BorderLayout thisLayout = new BorderLayout();
slin.setLayout(thisLayout);
slin.setBackground(new Color(255,255,255));
{
ListModel jList1Model =
new DefaultComboBoxModel(
new String[] {" "," ", "1.Introduction","2.Tableaux","3.Listes chaînées","4.Piles","5.Files","6.Conclusion" });
jList1 = new JList();
slin.add(jList1, BorderLayout.WEST);
jList1.setModel(jList1Model);
jList1.setBounds(21, 74, 146, 133);
jList1.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
jList1.setFont(new Font("Bookman Old Style",3,18));
jList1.setForeground(new Color(0,0,0));
jList1.setBackground(new Color(255,128,64));
jList1.setPreferredSize(new Dimension(216, 291));
}
{
jLabel1 = new JLabel();
slin.add(jLabel1, BorderLayout.NORTH);
jLabel1.setText("Plan :");
//jLabel1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("lika/logo.gif")));
jLabel1.setBounds(0, 0, 384, 50);
jLabel1.setFont(new Font("Bookman Old Style",1,28));
jLabel1.setBorder(BorderFactory.createTitledBorder(""));
jLabel1.setIconTextGap(8);
jLabel1.setPreferredSize(new Dimension(384, 72));
jLabel1.setBackground(new Color(192,192,192));
jLabel1.setForeground(new Color(0,0,0));
}
{ JPanel jPanel1;
jPanel1= new JPanel();
slin.add(jPanel1, BorderLayout.SOUTH);
jPanel1.setBounds(0, 225, 384, 32);
jPanel1.setBackground(new Color(0,0,0));
jPanel1.setPreferredSize(new Dimension(384, 49));
jPanel1.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
{
jButton1 = new JButton();
jPanel1.add(jButton1);
jButton1.setText("<");
jButton1.setBorder(BorderFactory.createCompoundBorder(null, null));
jButton1.setPreferredSize(new Dimension(23, 22));
jButton1.setBackground(new Color(255,128,64));
jButton1.setFont(new Font("Segoe UI",3,20));
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
getContentPane().add(pan,"Fenetre");
CardLayout cl = (CardLayout)(getContentPane().getLayout());
cl.show(getContentPane(), "Fenetre");
}
});
}
{
jButton2 = new JButton();
jPanel1.add(jButton2);
jButton2.setText(">");
jButton2.setPreferredSize(new Dimension(25, 21));
jButton2.setBorder(BorderFactory.createCompoundBorder(
null,
null));
jButton2.setBackground(new Color(255,128,64));
jButton2.setFont(new Font("Segoe UI",3,20));
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
getContentPane().add(new Sl1pan().getpa(),"sl1");
CardLayout cl = (CardLayout)(getContentPane().getLayout());
cl.show(getContentPane(), "sl1");
}
});
}
}
{
jLabel2 = new JLabel();
slin.add(jLabel2, BorderLayout.EAST);
//jLabel2.setIcon(new ImageIcon(getClass().getClassLoader().getResource("lika/sdl.gif")));
jLabel2.setPreferredSize(new Dimension(426, 378));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Sl1pan {
private JButton jButton1;
private JTextPane jTextPane1;
private JScrollPane jScrollPane1;
private JLabel jLabel2;
private JLabel jLabel1;
private JButton jButton2;
private JPanel sl1;
public JPanel getpa() {
return sl1;
}
public Sl1pan(){
try {
BorderLayout thisLayout1 = new BorderLayout();
sl1.setLayout(thisLayout1);
sl1.setBackground(new java.awt.Color(255,255,255));
{ JPanel jPanel1;
jPanel1 = new JPanel();
getContentPane().add(jPanel1);
jPanel1.setBackground(new java.awt.Color(0,0,0));
jPanel1.setBorder(new SoftBevelBorder(BevelBorder.LOWERED,null,null,null,null));
jPanel1.setBounds(0, 434, 753, 49);
{
jButton1 = new JButton();
jPanel1.add(jButton1);
jButton1.setText("<");
jButton1.setBackground(new java.awt.Color(255,128,64));
jButton1.setFont(new java.awt.Font("Segoe UI",3,20));
jButton1.setPreferredSize(new java.awt.Dimension(23,22));
jButton1.setBorder(BorderFactory.createCompoundBorder(null,null));
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
}
{
jButton2 = new JButton();
jPanel1.add(jButton2);
jButton2.setText(">");
jButton2.setBackground(new java.awt.Color(255,128,64));
jButton2.setFont(new java.awt.Font("Segoe UI",3,20));
jButton2.setPreferredSize(new java.awt.Dimension(25,21));
jButton2.setBorder(BorderFactory.createCompoundBorder(null,null));
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
}
}
{
jLabel1 = new JLabel();
sl1.add(jLabel1);
jLabel1.setText("1. Introduction :");
//jLabel1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("lika/logo.gif")));
jLabel1.setIconTextGap(8);
jLabel1.setBackground(new java.awt.Color(192,192,192));
jLabel1.setFont(new java.awt.Font("Bookman Old Style",1,28));
jLabel1.setForeground(new java.awt.Color(0,0,0));
jLabel1.setBorder(BorderFactory.createTitledBorder(""));
jLabel1.setBounds(0, 0, 753, 72);
}
{
jLabel2 = new JLabel();
sl1.add(jLabel2);
jLabel2.setBounds(413, 115, 300, 272);
jLabel2.setBackground(new java.awt.Color(255,128,128));
//jLabel2.setIcon(new ImageIcon(getClass().getClassLoader().getResource("lika/sdl.gif")));
}
{
jScrollPane1 = new JScrollPane();
sl1.add(jScrollPane1);
jScrollPane1.setBounds(18, 71, 358, 361);
jScrollPane1.setBorder(new LineBorder(new java.awt.Color(0,0,0), 1, false));
{
jTextPane1 = new JTextPane();
jScrollPane1.setViewportView(jTextPane1);
jTextPane1.setText(" Ce document est un résumé concernant les structures leseuvent être appliquées sur ces structures. Enfin, pour certaines d'entre elles, nous développons quelques exemples d'utilisation.");
jTextPane1.setPreferredSize(new java.awt.Dimension(356, 359));
jTextPane1.setBorder(BorderFactory.createCompoundBorder(
null,
null));
jTextPane1.setEditable(false);
jTextPane1.setBackground(new java.awt.Color(254,169,129));
jTextPane1.setFont(new java.awt.Font("Bookman Old Style",2,14));
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void jButton1ActionPerformed(ActionEvent evt) {
JFrame u=new JFrame();
u.setVisible(true);
}
private void jButton2ActionPerformed(ActionEvent evt) {
JFrame u=new JFrame();
u.setVisible(true);}
}
} |
Partager