32,199 Topics

Member Avatar for
Member Avatar for speakon

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 …

Member Avatar for JamesCherrill
0
3K
Member Avatar for anuj_sharma

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()) …

Member Avatar for dougWill
0
282
Member Avatar for 47pirates

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 …

Member Avatar for dougWill
0
3K
Member Avatar for grga4life

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 …

Member Avatar for NormR1
0
169
Member Avatar for iEpic

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 …

Member Avatar for JamesCherrill
0
94
Member Avatar for thanh_cong

//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; …

Member Avatar for Dani
-1
215
Member Avatar for aspundir

I want all three applets conaitning this site http://www.planetarypositions.com/ can anybody help me?

0
94
Member Avatar for Maymac

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" …

Member Avatar for NormR1
0
165
Member Avatar for nikolaos

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 …

Member Avatar for nikolaos
0
240
Member Avatar for evandana

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 …

Member Avatar for peter_budo
0
672
Member Avatar for Krokcy

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 …

0
424
Member Avatar for pendo826

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; …

Member Avatar for Krokcy
0
185
Member Avatar for trishtren

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 …

Member Avatar for trishtren
0
175
Member Avatar for B204

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"); …

Member Avatar for JamesCherrill
0
952
Member Avatar for delta_frost

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 …

Member Avatar for delta_frost
0
368
Member Avatar for SHAHAB UDDIN

How i take a line string input through keyboard ?. Example : I am a student .

Member Avatar for godzab
0
137
Member Avatar for antonis21

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 …

Member Avatar for dougWill
1
107
Member Avatar for pooja.shinde

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, …

Member Avatar for pooja.shinde
0
347
Member Avatar for s.mahamure

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. …

Member Avatar for s.mahamure
0
299
Member Avatar for Rhysorourky

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); …

Member Avatar for JamesCherrill
0
115
Member Avatar for karthikprs

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 …

Member Avatar for JamesCherrill
0
255
Member Avatar for VernonDozier

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for karthikprs

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. …

Member Avatar for karthikprs
0
2K
Member Avatar for enuff4life

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....

Member Avatar for matthewetaft
0
708
Member Avatar for Aviras

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 …

Member Avatar for Troy III
1
393
Member Avatar for trishtren

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 …

Member Avatar for NormR1
0
419
Member Avatar for raviaaaa

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

Member Avatar for DavidKroukamp
0
559
Member Avatar for warlord902

I want to know, is it possible to use a mySQL database simultaneously from a PHP website and a Java Website both making continous read and write operations. Are there any tradeoffs? Does connection pooling affect this?

Member Avatar for joehms22
0
179
Member Avatar for atummapala

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 …

Member Avatar for JamesCherrill
0
428
Member Avatar for StephenHawking9

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 …

Member Avatar for JamesCherrill
0
169

The End.