32,199 Topics
| |
Hello! I am very new to Java and programming theory and desperately trying to improve my knowledge. This is the first program I've made without help and really would appreciate some feedback. I know there must be 1,000,000 better ways to do what I did. Notes: - I want to … | |
Hi, I am trying to add content to an excel sheet using the below code. However, when I open the excel sheet, nothing is added. Please advice. public class StepNoToExcel { HSSFWorkbook wb = null; String fileName = "C:\\StepNoForEvidences.xls"; File file = null; StepNoToExcel() { file = new File(fileName); if(!file.exists()) … | |
I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i … | |
Hello everyone,I have little problem over here with my work. It gives null pointer about JTextArea in ActionListener. Could anyone help me,please? Thanks in advance Here's code: import java.awt.event.*; import java.io.*; import javax.swing.*; /** * @author Nikola * */ public class FileListener implements ActionListener { private JMenuItem exit; private JMenuItem … | |
Im taking a java class right now but I am still a complete noob. I want to make a program where it searches a text file and will write the usernames it finds to a new text file. Usernames are always found like this in the file... <a href="/user/iEpic" the … | |
//Application Forms import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.GridLayout; import java.awt.HeadlessException; import java.awt.Panel; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Vector; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.TableCellRenderer; … | |
I want all three applets conaitning this site http://www.planetarypositions.com/ can anybody help me? | |
Hello I am new to java and am having problem loading table numbers from mysql database to tablenumberJComboBox. I am using the load tablenumbers method. private void loadTableNumbers() { // read all table numbers from database try { // obtain all table numbers myResultSet = myStatement.executeQuery( "SELECT tableNumber FROM restaurantTables" … | |
I want to write a version of the SAND GAME. I want to examine the color of every pixel in a Jframe window. I use something like this. Toolkit toolkit = Toolkit.getDefaultToolkit (); Dimension dim = toolkit.getScreenSize(); int height = dim.height; int width = dim.width; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice … | |
I need help getting the Apache POI set up correctly. I downloaded this file: [url]http://mirrors.devlib.org/apache/poi/release/bin/poi-bin-3.2-FINAL-20081019.tar.gz[/url] from poi.apache.org, and don't know what to do next? Where do I put this file? Are there other files I need to download? I hear talk of setting a "Classpath". What is this, and how … | |
EDIT: Im an idiot. The hand-shake like mechanic i put in where the server waits for the client to respond was the reason it was so slow, removed it and it worked. I misunderstood/forgot how streams work.. Ok. So i just started learning how to use the network utility there … | |
Hey i am making an application that stores employee's details and the output is different than what it should be i was expecting the output to be the toString() in the employee class can anyone see anythin wrong: //Imports: //******************************************************************** //Employee Class. public class Employee { //Variables. private String employeeName; … | |
hey, Iv been working on an swf file generator following the specification, However i am currently struggling to have my binary output match the binary output of a swf file gengerated by flash CS3. The particular part i am struggling with is the file attributes tag, the specifications for the … | |
i want to send large files,,,,,this program only send upto size:1024*1024 ,,,,plz help me out!! client- import java.net.*; import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; class ftpclient extends JFrame implements ActionListener { JButton b1,b2; JTextField t1; ftpclient() { b1 =new JButton("Select File"); b2 = new JButton("Send File to Server"); … | |
I have designed a sender-reciever type program where the sender sends a file and the reciever recieves it automatically. The problem is that though I am using byte-based streams,the output in ceratin cases as follows are getting distorted: [A]: Bitmap images are getting color-inverted. [B]: Files other than text files … | |
How i take a line string input through keyboard ?. Example : I am a student . | |
Hi, I wrote the followiing code for a Jtable: public class simpletabletest extends JPanel{ public simpletabletest() { String[][] data = { {"...", "...", "...", "..."}, {"...", "...", "...", "..."}, {"...", "...", "...", "..."}}; String[] Columns = {"Name", "LastName", "Phone", "MobilePhone"}; //DefaultTableModel model = new DefaultTableModel(data, Columns); JTable table = new … | |
Hello all, I am using Windows server 2008 OS as domain controller. When user's request comes, his id & password are verified across Active directory. If his id & password are already present in active directory then java program returns as valid user or otherwise returns as invalid user. Now, … | |
hello, i am creating client server module.i want username and password from active directory for authentication. first time when i run program it it authenticate users but when i delete user & change password policy after that created new user and run the program then i got error authentication error. … | |
ok im from C++ but no starting java this is my attempt of the password protect program which you get three try at but for some reason it dosnt compile it just gets errors import java.util.Scanner; public class password { public static void main(String args[]){ Scanner input = new Scanner(System.in); … | |
I did a page for adding and viewing activities in a project. The table linked with that page has an UNIQUE constraint for the activity code. As a result of which when i add a new activity with existing Activity code, it is not accepted and gives a runtime error … | |
I'm getting an error that I don't understand. It's a Null Pointer Exception, but neither of my arguments in line 118 is null. According to the documentation, ImageIO.write will throw a IllegalArgumentException or an IOException, but it isn't throwing either. I'm not sure what could be null here. You can … | |
Actually i'm planning to make a user registration page over swings and i decided that there should be a constraint that people with age below 21 cannot register. I want to make a validation of the date input of the user by calcualting the age and checking with if loop. … | |
when i do... [ICODE]String menu; Scanner keyboard = new Scanner(System.in); menu = keyboard; if (menu = "D"){ .... }[/ICODE] there is error sign under "menu = "D"" <can't convert String to boolean> why menu is boolean? I stated in String.... | |
Hello everyone, this is something I wrote a couple months back. It is used as a universal class/object loader from an XML file. For the handling of XML I use the JDOM library. The story basically goes like this: I have a load of classes in a game I'm working … | |
hello again, i am having problems outputing the correct format of hex, the result i am aiming to achieve in my file should be : 78 00 07 D0 00 00 17 70 00 00 <-- aiming to achieve D8 00 6F D0 00 00 7F F0 00 <-- actual … | |
Hi All I wanted to write string.contains() in jdk 1.4, but i know 1.4 doesn't support contains is there any way to do the same ex: if the string contains "," i want check the condition String name; if(name.contains(",")) is there any way to do in jdk 1.4 Regards Ravi | |
Hello Everybody, I am having a doubt regarding how to upload a file to multiple machines or servers. I tried using with FTP but getting ConnectException:connection Refused import sun.net.ftp.*; import java.io.*; public class SendFile { public static void main(String args[]) { String hostname = "172.14.3.23"; //Remote FTP server: Change this … | |
Hi Experts, I have started learning java recently and looking into some practice exercise. Just wante to know if there is a easy way, to convert a List of java.lang.Integer objects to array of primitive int type (not integer). Something like List<Integer> to int []? Or I need to loop … |
The End.