Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some help with given code . For a presentation , I need to explain this code . Can some one give me the

I need some help with given code.For a presentation,I need to explain this code.Can some one give me the explanation?
JLabel lblPayHour = new JLabel("Pay / Hour :");lblPayHour.setFont(new Font("Times New Roman", Font.BOLD, 15));lblPayHour.setBounds(320,593,144,14);p1.add(lblPayHour);JLabel background = new JLabel("New label");background.setIcon(new ImageIcon("bgd.png"));background.setBounds(0,0,714,757);p1.add(background);try { BufferedReader reader1= new BufferedReader(new FileReader(file1)); int totalLines =0; while (reader1.readLine()!= null) totalLines++; reader1.close();for (int i =0; i < totalLines; i++){String line = Files.readAllLines(Paths.get(file1)).get(i); String x = line.substring(0,6); if (x.equals("2.User")){String userN = Files.readAllLines(Paths.get(file1)).get(i).substring(15);String skill = Files.readAllLines(Paths.get(file1)).get(i+4).substring(13);String address = Files.readAllLines(Paths.get(file1)).get(i+3).substring(13);String pay = Files.readAllLines(Paths.get(file1)).get(i+5).substring(13);txtFatimaBegum.setText(userN);txtCooking.setText(skill);txtStreetRoadDhaka.setText(address);txtTk.setText(pay+"TK");}}} catch (Exception ex){ return; }}}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

LO2 Describe the various purposes of performance appraisals.

Answered: 1 week ago