1 / 3

Java : JOptionPane

Java : JOptionPane. JOptionPane.showMessageDialog : Permit to create a windows where you can write a message which will be visible on screen. JOptionPane.showInputDialog : Permit to create a windows where you can insert an element , for example , numbers end characters.

Download Presentation

Java : JOptionPane

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java : JOptionPane JOptionPane.showMessageDialog: Permit to create a windowswhereyou can write a messagewhich will be visible on screen. JOptionPane.showInputDialog: Permit to create a windowswhereyoucan insert an element, for example , numbersend characters.

  2. JOptionPane.showMessageDialog Str= "esempio di prova! " JOptionPane.showMessageDialog(null,str) JOptionPane.showInputDialog Stringstin=JOptionPane.showInputDialog("inserire un numero"); int numero=Integer.parseInt(stin);

  3. Java: cycle for and while • While(condition){ Body of cycle;} Condition: is the condition of the loop control , when the condition is true the loop body is executed. • For(variabledeclaration; condition; incrementingvariable){ Body of cycle;} Variable: is the control variable of the loop Condition: isequal to the whileloop Incrementing: is the incrementing of variableuntil the condition is false. Thispermit to stop the cycle.

More Related