Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need explanation of theis code.public class profile 1 extends JFrame { private JPanel p 1 ; private JTextField txtFatimaBegum; private JTextField txtCooking; private JTextField txtStreetRoadDhaka;
need explanation of theis code.public class profile extends JFrame
private JPanel p;
private JTextField txtFatimaBegum;
private JTextField txtCooking;
private JTextField txtStreetRoadDhaka;
private JTextField txtTk;
public profile
setTitleProfile;
setDefaultCloseOperationJFrameDISPOSEONCLOSE;
setBoundsnew Rectangle;
setLocationRelativeTonull;
p new JPanel;
psetBackgroundColorWHITE;
setContentPanep;
psetLayoutnull;
String fileDatabuadata.txt;
JLabel l new JLabelNew label";
lsetIconnew ImageIcon;
lsetBackgroundColorWHITE;
lsetBounds;
paddl;
JLabel b new JLabelHire;
baddMouseListenernew MouseAdapter
@Override
public void mouseClickedMouseEvent e
setVisiblefalse;
payment p new payment;
psetVisibletrue;
;
bsetHorizontalAlignmentSwingConstantsCENTER;
bsetFontnew FontTimes New Roman", Font.BOLD, ;
bsetBounds;
bsetBackgroundnew Color;
bsetForegroundnew Color;
paddb;
JLabel l new JLabelNew label";
lsetIconnew ImageIconBuapng;
lsetBounds;
paddl;
JLabel btnBack new JLabelBACK;
btnBack.addMouseListenernew MouseAdapter
@Override
public void mouseClickedMouseEvent e
setVisiblefalse;
;
btnBack.setHorizontalAlignmentSwingConstantsCENTER;
btnBack.setFontnew FontTimes New Roman", Font.BOLD, ;
btnBack.setForegroundnew Color;
btnBack.setBounds;
paddbtnBack;
JLabel lblNewLabel new JLabelName :;
lblNewLabel.setFontnew FontTimes New Roman", Font.BOLD, ;
lblNewLabel.setBounds;
paddlblNewLabel;
txtFatimaBegum new JTextField;
txtFatimaBegum.setBackgroundColorWHITE;
txtFatimaBegum.setEditablefalse;
txtFatimaBegum.setFontnew FontTimes New Roman", Font.BOLD, ;
txtFatimaBegum.setBordernew MatteBorderColor new Color;
txtFatimaBegum.setBounds;
paddtxtFatimaBegum;
txtFatimaBegum.setColumns;
txtCooking new JTextField;
txtCooking.setFontnew FontTimes New Roman", Font.BOLD, ;
txtCooking.setBordernew MatteBorderColor new Color;
txtCooking.setColumns;
txtCooking.setBounds;
paddtxtCooking;
JLabel lblSkills new JLabelSkills : ;
lblSkills.setFontnew FontTimes New Roman", Font.BOLD, ;
lblSkills.setBounds;
paddlblSkills;
txtStreetRoadDhaka new JTextField;
txtStreetRoadDhaka.setFontnew FontTimes New Roman", Font.BOLD, ;
txtStreetRoadDhaka.setBordernew MatteBorderColor new Color;
txtStreetRoadDhaka.setColumns;
txtStreetRoadDhaka.setBounds;
paddtxtStreetRoadDhaka;
JLabel lblAddress new JLabelAddress :;
lblAddress.setFontnew FontTimes New Roman", Font.BOLD, ;
lblAddress.setBounds;
paddlblAddress;
txtTk new JTextField;
txtTksetFontnew FontTimes New Roman", Font.BOLD, ;
txtTksetBordernew MatteBorderColor new Color;
txtTksetColumns;
txtTksetBounds;
paddtxtTk;
JLabel lblPayHour new JLabelPay Hour :;
lblPayHour.setFontnew FontTimes New Roman", Font.BOLD, ;
lblPayHour.setBounds;
paddlblPayHour;
JLabel background new JLabelNew label";
background.setIconnew ImageIconbgdpng;
background.setBounds;
paddbackground;
try
BufferedReader reader new BufferedReadernew FileReaderfile;
int totalLines ;
while readerreadLine null
totalLines;
readerclose;
for int i ; i totalLines; i
String line Files.readAllLinesPathsgetfilegeti;
String x line.substring;
if xequalsUser"
String userN Files.readAllLinesPathsgetfilegetisubstring;
String skill Files.readAllLinesPathsgetfilegetisubstring;
String address Files.readAllLinesPathsgetfilegetisubstring;
String pay Files.readAllLinesPathsgetfilegetisubstring;
txtFatimaBegum.setTextuserN;
txtCooking.setTextskill;
txtStreetRoadDhaka.setTextaddress;
txtTksetTextpayTK;
catch Exception ex
return;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started