Archive

Posts Tagged ‘example’

Example Code #1 – JOptionPane and ArrayList

December 20th, 2008 No comments

Here this class takes some values using JOptionPane.showInputDialog and shows them to the user using foreach loop

import java.util.ArrayList;
import javax.swing.JOptionPane;

public class Confirm {

ArrayList fruits = new ArrayList();

Confirm(){
String value = "";
while (true){
value = JOptionPane.showInputDialog("Which fruit to Add?");

Read more…

VN:F [1.9.11_1134]
Rating: 5.5/10 (4 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)