Which of the following is the correct syntax for adding a JButton named b1 to a Container

Question:

Which of the following is the correct syntax for adding a JButton named b1 to a Container named con when using CardLayout?

a. Con.add(b1);

b. Con.add("b1");

c. Con.add("Options", b1);

d. None of the above

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: