99 bottles of beer: Difference between revisions
Content added Content deleted
(→{{header|Java}}: Addd GUI version) |
m (→GUI: I forgawt) |
||
Line 42: | Line 42: | ||
===GUI=== |
===GUI=== |
||
{{works with|Swing}} |
{{works with|Swing}} |
||
{{works with|AWT}} |
|||
This version requires user interaction. The first two lines are shown in a text area on a window. The third line is shown on a button which you need to click to see the fourth line in a message box. The numbers update and the process repeats until "0 bottles of beer on the wall" is shown in a message box, when the program ends. |
This version requires user interaction. The first two lines are shown in a text area on a window. The third line is shown on a button which you need to click to see the fourth line in a message box. The numbers update and the process repeats until "0 bottles of beer on the wall" is shown in a message box, when the program ends. |
||
<java>import java.awt.BorderLayout; |
<java>import java.awt.BorderLayout; |