Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~14.3K People Reached
Favorite Tags
Member Avatar for 03hasnam

From Class Model: public TableModel getTableData() { TableModel model=null; try { String sql = "SELECT eventID as 'Event ID', date as 'Date',eventName as 'Name', time as 'Start Time' FROM Event"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); model = (DbUtils.resultSetToTableModel(rs)); } catch(SQLException e){ e.printStackTrace(); } finally { try {rs.close(); pst.close(); } …

Member Avatar for Taywin
0
234
Member Avatar for 03hasnam

Here is a section of code from a MODEL class of the MVC Framework: public TableModel getTableData() throws SQLException { try { String sql = "SELECT date as 'Date',eventName as 'Name', time as 'Start Time' FROM Event"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); TableModel model = (DbUtils.resultSetToTableModel(rs)); return model; } …

Member Avatar for JamesCherrill
0
284
Member Avatar for 03hasnam

public class EventView extends javax.swing.JFrame { Connection conn = JavaConnect.ConnectDB(); PreparedStatement pst = null; ResultSet rs = null; private EventModel model; /** Constructor */ public EventView(EventModel model) { initComponents(); this.model = model; updateEventTable(); } public void addEventListener(ActionListener al) { addEventButton.addActionListener(al); } /* public void clearListener(ActionListener cl) { clearEventButton.addActionListener(cl); }*/ public …

Member Avatar for JamesCherrill
0
135
Member Avatar for 03hasnam

A person wishes to add a NEW Job to the database. A `Combobox` list the existing employers already in the database for the new Job to be added against. But if an employer is not present customers have the option click on a button to add an employer. Once added …

Member Avatar for DavidKroukamp
0
675
Member Avatar for nmakkena

Hi I am populating my combobox with table's data (example table name is "ITEMS" and table is having only one column and that is displayed as combobox items). In my form i am having i combobox,button and textbox. I will enter a new item in textbox and if i click …

Member Avatar for 03hasnam
0
3K
Member Avatar for 03hasnam

I used the folowing website towards the end of the website http://zetcode.com/databases/sqlitephptutorial/ to make a connection to the sqlite database using PHP. Working on netbeans and have imported the appropriate driver and jar files however clicking submit on html is not doing the job and simply prints the whole php …

Member Avatar for TonyG_cyprus
0
197
Member Avatar for 03hasnam

I am finding it difficult to update the `JTable` when I enter a person's name in search button. The program compiles correctly without any errors, but in `SearchActionPerformed` event when the search button is pressed an empty table comes up. Where without search, the table is full of values from …

Member Avatar for mvmalderen
0
555
Member Avatar for 03hasnam

Hi, I have something wrong at table_academicMouseClicked() method which results me with a java.lang.NullPointerException error. basically trying to compare the surname in Jtable and look it up on the database to select the corresponing record so that I can set the label to the value from database. So when a …

Member Avatar for Taywin
0
485
Member Avatar for 03hasnam

I am unable to execute the editProfile() method in MainMenu class. The purpose of the method is to be able to extract the bean values and display them on the empty textfield. I am not sure if i did it correctly. any recommendations for any changes to editProfile() method. public …

Member Avatar for 03hasnam
0
503
Member Avatar for 03hasnam

want to append information onto a file based on user selection of minutes (1 min, 15, 30, 45min etc) through radio buttons. for each radio button there are case in switch statement. I am finding it difficult to update the file on a regular interval, continously, does anyone know how …

Member Avatar for NormR1
0
88
Member Avatar for 03hasnam

Hey Everyone, i cannot print the value of Username in the JSP. i am using a java bean, but i am instiating the bean object twice in two servlet, one for form data and one for username. the bean contains the respective setUsername and getUsername, but this is not printing …

0
62
Member Avatar for 03hasnam

i am getting lots of error like this for all form inputs. i am trying to use javabeans and jsp where a jsp will be responsible for outputting the final information (cost of booking and bookingreference). The servlet needs to pass control to this JSP. this is the error which …

Member Avatar for 03hasnam
0
220
Member Avatar for 03hasnam

Please can anyone help me install the rxtx library for serial communication. Ive save the relevant files rxtxSeriel.dll and RXTXcomm in to the appropriate bin and lib/ext files, but what are the next steps?

Member Avatar for m1n1m3
0
181
Member Avatar for 03hasnam

I need to prevent entry to a car park system during public holidays, but instead of making more classes i was hoping it could be done within my existing method. my question is, is there such thing in java that already has public holiday dates predefined and can be used …

Member Avatar for dmanw100
0
2K
Member Avatar for 03hasnam

please consider the following file of given staff. [CODE]Bob 100100653 5860 London H3ll0 1[/CODE] How do i extract the 6th line for multiple files and generate a report in java for each files under same directory? the above is just one file data. i want to read multiple files and …

Member Avatar for NormR1
0
368
Member Avatar for 03hasnam

[CODE]import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Login extends JFrame{ JButton SUBMIT; JPanel panel; JLabel label1, label2; public static int accessGrant = 1; JTextField username; JPasswordField pw; public Login() { label1 = new JLabel(); label1.setText("Username: "); username = new JTextField(15); label2 = new JLabel(); label2.setText("Password: "); pw = new …

Member Avatar for NormR1
0
130
Member Avatar for 03hasnam

[CODE]ImageIcon tenP1 = new ImageIcon("10p.gif"); tenP = new JButton("", tenP1); ImageIcon twentyP1 = new ImageIcon("20p.gif"); twentyP = new JButton("", twentyP1); ImageIcon fiftyP1 = new ImageIcon("50p.gif"); fiftyP = new JButton("", fiftyP1); ImageIcon pound = new ImageIcon("pound.gif"); onePound = new JButton("", pound); ImageIcon twopound = new ImageIcon("twopound.gif"); twoPound = new JButton("", twopound);[/CODE] …

Member Avatar for 03hasnam
0
3K
Member Avatar for 03hasnam

[CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.text.*; import java.lang.*; import java.util.*; import java.io.*; public class PaymentNewGUI extends JFrame{ private JButton tenP, twentyP, fiftyP, onePound, twoPound, payButton; JTextField ticketID; Label lEntranceTime; Label lPaymentTime; Label lTimeDifference; Label lDue; Label lInserted; Label lMessage = new Label("Enter Your Ticket Number"); Container …

Member Avatar for JamesCherrill
0
1K
Member Avatar for 03hasnam

[CODE]/*********************Pay Button Listener***************************************/ public class payListener implements ActionListener{ public void actionPerformed(ActionEvent e) { replace(); Ticket getNewPayTime = new Ticket(); getNewPayTime.loadTicket(ticketIDNumber); paymentTime = Ticket.paymentTime; //getting correct ticket pyament time, correction performed by replace method. long timeDifference = paymentTime - entranceTime; SimpleDateFormat sdf1 = new SimpleDateFormat("MMM dd,yyyy HH:mm"); Date paymentdate = new …

Member Avatar for NormR1
0
140
Member Avatar for 03hasnam

[B]Hello Guys, Hope youre all well :) Please can someone kindly tell me how I can write to a specific line. The value to be written needs to be in long and not as a string. The File is as follows: 1324214082786 1313131 Paid 0.0 the seconds line is time …

Member Avatar for JamesCherrill
0
459
Member Avatar for 03hasnam

[CODE]/*********************Pay Button Listener***************************************/ public class payListener implements ActionListener{ public void actionPerformed(ActionEvent e) { String fileName2 = "Ticket/"+ticketIDNumber+".dat"; File ticket2 = new File(fileName2); if(ticket2.exists()){ try{ FileReader fileReader = new FileReader(fileName2); BufferedReader bufferedReader = new BufferedReader(fileReader); bufferedReader.readLine(); //OMIT Entrance Time FileWriter fw = new FileWriter(fileName2); BufferedWriter bufferedWriter = new BufferedWriter(fw); //fw.write("Hello"); bufferedReader.close(); …

Member Avatar for 03hasnam
0
174
Member Avatar for 03hasnam

[B]guys please help me with this. my problem is that on PaymentNewGUI class i am finding it hard to extract the entrance time from the file to be displayed on the gui if correct ticket number is added, reference to enterListener method in paymentnewGUI class thank you[/B] [CODE]import java.awt.*; import …

Member Avatar for 03hasnam
0
171
Member Avatar for 03hasnam

WHY DO I GET ERRORS FOR loadTicket MEthod saying incompatiable type, please someone tell me whats wrong and tell me the correction for it? import java.util.Date; import java.lang.*; import java.io.*; import java.util.Calendar; public class Ticket { public TicketInfo x; public int tNumber; public static long entranceTime; public static long paymentTime; …

Member Avatar for stultuske
0
283