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.

~33.8K People Reached
Favorite Tags

33 Posted Topics

Member Avatar for ~s.o.s~
Member Avatar for ~s.o.s~
46
6K
Member Avatar for chdboy

I'm not able to login into my router admin panel. I'm connected with LAN cable,my wifi is disabled. I'm using 192.168.1.1 to login into router. It always says connection timed out. I just want to use this router to improve my wifi coverage in the house.

Member Avatar for chdboy
0
2K
Member Avatar for chdboy

This is the code void CreateGUI() { try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); //myPicture = ImageIO.read(getClass().getResource("Companylogo_FINAL.jpg")); /*java.net.URL u = getClass().getResource("/resources/Companylogo_FINAL.jpg"); System.out.println(u); myPicture = ImageIO.read(u);*/ /*try {*/ //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); /*} catch (IOException e) { }*/ ImageIcon img = new ImageIcon(myPicture); //frame.setIconImage(img.getImage()); } catch (IOException e1) …

Member Avatar for chdboy
0
482
Member Avatar for chdboy

Here is the error I'm getting Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input == null! And here is the code try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(getClass().getResource("/resources/Companylogo_FINAL.jpg")); ImageIcon img = new ImageIcon(myPicture); frame.setIconImage(img.getImage()); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } JLabel lbl = new …

Member Avatar for chdboy
0
2K
Member Avatar for chdboy

import java.awt.Frame; import java.awt.SplashScreen; import javax.swing.JOptionPane; public class NewFrame extends Frame { public NewFrame() { // TODO Auto-generated constructor stub SplashScreen splash = new SplashScreen(1000); System.out.println("This is working"); } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //SplashScreen splash = new SplashScreen(2000); …

Member Avatar for JamesCherrill
0
305
Member Avatar for chdboy

I'm not able to see content on JFrame ,when JFrame shows up. import java.awt.*; import javax.swing.*; import java.awt.event.*; public class GraphicUse extends JPanel { public void PaintComponent(Graphics gr) { super.paintComponents(gr); this.setBackground(Color.BLUE); gr.setColor(Color.WHITE); gr.fillRect(50, 50, 100, 100); gr.setColor(new Color(139,38,190)); gr.fillRect(50, 70, 100, 100); gr.setColor(Color.RED); gr.drawString("This is a new String", 50, 90); …

Member Avatar for JamesCherrill
0
228
Member Avatar for chdboy

Is there any way that I don't use lots of IF statements?,right now it is according to Index of combo box items. else if(e.getSource().equals(jcb1)) { int selectedindex = jcb1.getSelectedIndex(); String comb_string = (String)jcb1.getSelectedItem(); if(selectedindex==1) { try { //String sql_command ="select * , count(*) over (partition by 1) total_rows from Employer …

Member Avatar for JamesCherrill
0
289
Member Avatar for chdboy

I have a form in which I have made File no =field which displays(From sql database) the Integer value like 1-2-3-4 and so on. I want that ,when I save a form which has file no 1 ,and then after when I want to save the next record it should …

Member Avatar for chdboy
0
2K
Member Avatar for chdboy

I want to open an Instance of a form in MDI Container here is my code I just want an instance of a form to Edit records in the database Private Sub BtnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEdit.Click Dim Emp As New Employee() Emp.MdiParent = Me …

Member Avatar for deceptikon
0
3K
Member Avatar for chdboy

I am trying to update with this code Result.updateInt("bank_ac_no",Integer.parseInt(acnotxtfield.getText().trim())); //this is the line I'm getting error. Here is the Trace java.lang.NumberFormatException: For input string: "2737383928291819" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:495) at java.lang.Integer.parseInt(Integer.java:527) What's wrong?

Member Avatar for chdboy
0
2K
Member Avatar for chdboy

I have this code which saves the value into database from JSpinner SpinnerListModel monthModel = new SpinnerListModel(); String[] monthStrings = {"1Month","3Month","6Month","1Year"}; //get month names monthModel = new SpinnerListModel(monthStrings); JSpinner spinner = new JSpinner(monthModel); statement.setString(28,(String)monthModel.getValue().toString().toUpperCase()); But how to get that value back for Editing? I tried spinner.setText((String)monthModel.getValue(),29); But it says The …

Member Avatar for Seldar
0
519
Member Avatar for AODfan

Add one Panel which has your buttons,and add one panel which has your radio buttons. Then you can put button panel to the south and radio button panel to east For Eg. Button Panel JPanel buttonpanel = new JPanel(); JFrame frame = new JFrame(); JButtton firstbtn = new JButton("Yourfirstbtnname"); JButtton …

Member Avatar for chdboy
0
629
Member Avatar for chdboy

When I click on Button which fetch records from the database it works fine public void fetchrecords() throws SQLException { Statement stmt = null; String query = "select * from Employer where Fileno=1"; try { stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs = stmt.executeQuery(query); while (rs.next()) { firstNameTextField.setText(rs.getString(2)); lastNameTextField.setText(rs.getString(3)); addressTextField.setText(rs.getString(4)); //and more records. …

Member Avatar for chdboy
0
201
Member Avatar for chdboy

I have a String which has been splitted like this String companyinforstring ="Company name.:Company profile no 1.:Company profile no 2.:Company profile no3.:---------------------------------------------------------------:Company address, :Street number, :Area,Area no2, :City. "; for (String retval: companyinforstring.split(":")) { System.out.println(retval); graphics.drawString(retval.toUpperCase(), 250, 200); } The Problem is that String which has been splitted, overlaping each …

Member Avatar for chdboy
0
199
Member Avatar for chdboy

I'm not able to get the printout. here is the code public class Billing extends Frame implements ActionListener,Printable { JButton printbtn = new JButton("Print"); } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if (pageIndex > 0) { return NO_SUCH_PAGE; } // User (0,0) is typically outside …

Member Avatar for JamesCherrill
0
305
Member Avatar for chdboy

I had two versions of SQLEXPRESS on my computer earlier ,now I have uninstalled 2012 SQLEXPRESS from my computer Now when I try to attach .MDF file made in 2012 version it gives me error. TITLE: Microsoft SQL Server Management Studio ------------------------------ Attach database failed for Server 'My-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo) For …

Member Avatar for chdboy
0
292
Member Avatar for chdboy

I have Class called ConnectionDB and in this class I have Main method and another function in the class ConnectionDB,That is private static Connection DBConnectionstring() In this function I have Connection URL ,Drivers inside this function . I want this function to be used in another class (GUILogin) with main …

Member Avatar for chdboy
0
205
Member Avatar for chdboy

This is my code : import java.awt.Button; import java.awt.Component; import java.awt.Container; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.*; import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SpringLayout; public class SpringSample extends Frame implements ActionListener { private static final long serialVersionUID = 1L; SpringSample() { …

Member Avatar for chdboy
0
2K
Member Avatar for chdboy

I'm using Sql Express in Eclipse here is the code import java.sql.*; public class Login { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("This is my new world"); //String url = "jdbc:sqlserver://\\SQLEXPRESS;databaseName=pay;integratedSecurity=true"; String url ="jdbc:sqlserver://SQLEXPRESS;databaseName=pay;integratedSecurity=true"; try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); } catch (ClassNotFoundException …

Member Avatar for chdboy
0
909
Member Avatar for chdboy

How to know which version 1.Microsoft SQL Server 2008.(Express) 2.Microsoft SQL Server 2012.(Express) Both installed on my machine,am I running(using)?

Member Avatar for chdboy
0
105
Member Avatar for chdboy

I have this code Dim con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Danial\documents\visual studio 2010\Projects\ESI_PF_Payroll_V1\ESI_PF_Payroll_V1\Pay.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True") con.Open() cmd.CommandText = "SELECT Firstname,Lastname FROM Employee where Firstname = @Firstname and Lastname = @Lastname" cmd.Parameters.Add(New SqlParameter("@Firstname", TextBox1.Text)) .Value = TextBox1.Text cmd.Parameters.Add(New SqlParameter("@Lastname", Lname_txt.Text)) .Value = Lname_txt.Text dr = cmd.ExecuteReader While dr.Read Label4.Text = dr(0) …

Member Avatar for chdboy
0
242
Member Avatar for chdboy

I have a DateTimePicker and Masked Textbox ,Masked Textbox almost covering all of DateTimePicker ,just down arrow key to select the date into the Masked Textbox. Question No1. What event should I put the current code?I want the selected date to be inside the Masked textbox after it is being …

Member Avatar for tinstaafl
0
2K
Member Avatar for chdboy

Hi, I'm adding day shift column where current month (I'm using datetimepicker for extracting month from it ) but getting this error Conversion failed when converting date and/or time from character string Here is the code Dim str10 As String = "Select COUNT(DayShift) FROM Attendance WHERE AttendanceStatus = 6 AND …

Member Avatar for chdboy
0
127
Member Avatar for chdboy

Hi, I have a form in which there are 11 textboxes and two button controls(Just example) ,I want the tab key control to be in the textbox1 when the form loads ,and then If I press Tab Key from keyboard then it will be on second number textbox and so …

Member Avatar for chdboy
0
212
Member Avatar for chdboy

How to know when is the last salary update(Incerease) was made? For Example If the salary in a given year is 4000 per month and next month he got the raise of 3000,(For two months he got 4000 and rst of the year 7000) now the salary will be 4000 …

Member Avatar for Reverend Jim
0
91
Member Avatar for chdboy

This code creates XML File Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connetionString As String Dim connection As SqlConnection Dim adapter As SqlDataAdapter Dim ds As New DataSet Dim sql As String connetionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Danial\documents\visual studio 2010\Projects\ESI_PF_Payroll_V1\ESI_PF_Payroll_V1\Pay.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" connection = New …

Member Avatar for chdboy
0
250
Member Avatar for chdboy

CODE: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Danial\documents\visual studio 2010\Projects\ESI_PF_Payroll_V1\ESI_PF_Payroll_V1\Pay.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True") Dim adaptor As New SqlDataAdapter Dim dataset As New DataSet con.Open() con.Close() con.Open() cmd = New SqlCommand(str, con) cmd.Connection = con cmd.CommandText = "SELECT Firstname FROM …

Member Avatar for chdboy
0
176
Member Avatar for chdboy

I have two tables Employer Employee Employer Table: I have one field EmployerID (pk Key assigned to it) Employee Table: EmployerID(pk Key assigned to it) IDEmployer(fk key assigned to it,and Allow Nulls:Checked) Now my question is how to relate two tables ,that I will now that who works for who? …

Member Avatar for Reverend Jim
0
199
Member Avatar for swaroop.striker

As I have entered this code in my project but with this when I click on the save button it shows me the strMessage = "Sorry. Invalid email address format." but it also saves into my database how can I prevent that?

Member Avatar for shama.shirva
0
3K
Member Avatar for chdboy

I have problem updating specific record(s) selected to edit from a DataGridView into textboxes ,where the data can be edited and then update to the database. Now my update statement must have a where clause ,but it's not working,right now the code I'm about to post does updated record(s),but not …

Member Avatar for chdboy
0
182
Member Avatar for chdboy

I'm trying to get values from DataGridView to the another form in textboxes and in Picturebox ,data in textboxes are there ok, but when I try to get a picture in a picturebox from DB it gives me this error. Buffer cannot be null Parameter name :buffer and here is …

Member Avatar for chdboy
0
3K
Member Avatar for chdboy

I'm making a payroll software ,I have made two forms 1.Employer Form 2.Employees form I think now that I have confused ,because now I cannot diffrenciate between who works for who any sugesstions how can I improve on design ,or something that can solve the confusion (Problem) I also have …

Member Avatar for chdboy
0
104
Member Avatar for chdboy

Hi I'm using a simple insert statemnt in from two textfield into my database using this code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (TextBox1.Text.Trim = "") Then MessageBox.Show("PLEASE DO NOT USE BLANK SPACES", "Data Entry Error") ElseIf (TextBox2.Text.Trim = "") Then MessageBox.Show("PLEASE DO …

Member Avatar for Reverend Jim
0
859

The End.