Answer to Question #204257 in Java | JSP | JSF for ayşe

Question #204257

(with GUI) developed with Java programming language.Use NetBeans Application.

Create a project named “FavoriteBooks” which keeps a list of the books that a user has read and liked.

Book id, Title, Category, First Author Name and Surname, Award Winner, Rating, Year, Number of Pages, and Short Description.

Functions:

1. Add a Book to the list with the given book id from a JTextField.

a) Data to be entered using JTextField components are: Title, Category, Author Name and Surname, Award Winner, Rating, Year, Number of Pages and short Description. This task should add the book to the text document.

b) Rating option can be selected from a JComboBox.

c) JTextArea can be used to enter a short description of the book.

d) Do not create a JTextField to enter the book id. Instead, the book id should be incremented automatically by checking the last book id in the text document.


1
Expert's answer
2021-06-07T17:20:54-0400
import java.awt.event.*;
import javax.swing.*;
class Main extends JFrame implements ActionListener {
    static JTextField tf;
    static JFrame fm;
    static JButton bn;
    static JLabel ln;
    public static void main(String[] args)
    {
        f = new JFrame("Application");


        b = new JButton("submit");
 
        Main te = new Main();
        t = new JTextField(16);
        JPanel p = new JPanel();
        p.add(t);
        p.add(b);
        p.add(l);
        f.add(p);
        f.setSize(300, 300);
 
        f.show();
    }
 
   

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS