leerpad door Dylan Rener

simple GUI designer extension for bluej

learn to work with the GUI

Where should the file from http://gbluej.slunecnisoustava.eu/ be placed?

  • user\BleuJ\lib\extensions
  • user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\BlueJ
  • C:\Users\Gebruiker\bluej

the GUI tour video: https://www.youtube.com/embed/TQL9TsWf8r0

In this video you are taken on a tour of the basic GUI System, visiting all three tabs and a few user interface compnents such as radiobuttons and labels.

​Join me on a journey through the program, from the buttons, past the endless java code, up to the menu generator.

video: https://www.youtube.com/embed/TQL9TsWf8r0

 

Can you name the interface components?

  • lblLastName
  • lblFirstName
  • txtFirstName
  • txtLastName
  • btnPaste
  • tfFullName

Which block of code can be used to extract from an interface-object

  • String text = tfNaam.getText();
  • String text = String.valueOf(tfNaam);
  • String text =(tfNaam).toString();
  • taresult.setText(tfNaam);

which block of code can be used to put text into an object as output?

  • taresult = "hallo";
  • taresult =("hallo".toString();
  • taresult.setText("hallo");
  • "hallo" = taresult;

Find the source of the code

match the correct code with the given components

  • btnDelete
    private void Delete (ActionEvent evt){ taresult.setText(""); String text = tfNaam.getText(); klas.delete(text); taresult.setText(text + "\n" + "was deleted"); }
  • lblDelete
    An event can not be programmed behind a label.
  • btnGemiddelde
    private void MinMaxenGemiddelde (ActionEvent evt){ taresult.setText(""); taresult.setText("min = " + klas.min() + "max = " + klas.m ax() + "gemiddelde = " + klas.gemiddelde()); }
  • btnZoekLln
    private void VindLln (ActionEvent evt){ taresult.setText(""); String text = tfNaam.getText(); String strI =(klas.geefLeerling(text)).toString(); taresult.setText(strI); }

Thanks and see you at the next Code lesson!

Your homework is to code a program where a class has students and these students can be added using the GUI.