35,618 Topics

Member Avatar for
Member Avatar for localp

i wont to use shocket programming to create a chat client. and the end users should be given a GUI interface. are there any sample codes available online .. please help me find some sample codes..

Member Avatar for stephen84s
0
33
Member Avatar for OracleLite

I'm in the process of writing a program that generates six random numbers. If I run the program I have so far, there's a bit of a problem. It is possible for this code to generate the same random number more than once. Generally speaking, lottery tickets require the numbers …

Member Avatar for javaAddict
0
485
Member Avatar for java2000

Im trying to make a counter that tells how many times a name appears with array. I am using a scanner that read the names from a file and stores it an array. It then uses random class to pick a random name. I then stored all the names that …

Member Avatar for java2000
0
172
Member Avatar for ub_old

Hi all. I have string contains xml content. I use dom xml parser. Below is my parse code. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc=builder.parse(new InputSource(new StringReader(xmlText))); It works but very slow. too slow. If i write xml to file and parse from file like builder.parse(filePath) then …

Member Avatar for sillyboy
0
134
Member Avatar for zaraeleus

Okay, I am a new student (to Java--well programming in general) and the first assignment we have is to create a program that computes the future value of an investment based on three user inputs (principle deposit, interest rate, and length of term in years). First of all, I am …

Member Avatar for zaraeleus
0
689
Member Avatar for alpha_gamma

Hello, I downloaded some code from coreservlets.com and put the code on BEA WebLogic 8.1. The code is actually from ch4 of the book "Core Servlets and Java Server Pages (Hall/Brown)". I wanted to run a particular html form that one fills out then goes to a servlet. The html …

Member Avatar for peter_budo
0
145
Member Avatar for rapture

I'm new in Java and supposed to write a program that prints a number into a diamond shape. It doesn't print correctly, can someone point out where I'm messed up? [code] private static void diamondOfAsterisks(int number) { int spaces = number / 2; int stars = 1; int row; int …

Member Avatar for rapture
0
100
Member Avatar for zatin

Hello!!! For my assignment I have to develop small library system. I'm doing ok, I'have developped borrower and book classes and they work just fine... I was wondering if anyone could just suggest how to implement copies for the book. (Sometimes the most popular books will have more copies)I'm not …

Member Avatar for Ezzaral
0
68
Member Avatar for celebritybree

I need a code that when I'm given two number, the computeer gives me back 4 integers ex) user gives me: "3 & 6" The computer displays back: "3,4,5,6"

Member Avatar for celebritybree
0
95
Member Avatar for JoeK

Can someone point me in the right directions. I have to build on an existing mortgage program. I have to pull interest rates in from an external txt file and have them populate my array. The array will then be used in a combobox pull down. I don't know which …

Member Avatar for JoeK
0
146
Member Avatar for jsand2

Hello everybody! I am new to the site and to java. I am in week 2 of my java class now and still not sure if I am enjoying it. Unfortunately I would say it is my weakest link in the IT field so I picked this class on my …

Member Avatar for jsand2
0
67
Member Avatar for radhasb

I have 2 .java files called model.java and table.java I have 3 class files, model.class, table.class and WindowCloser.class (which is in the table.java file). I've looked online on how to make a jar file, but whenever I try, either nothing happens or it says Main-class not found. table has the …

Member Avatar for stephen84s
0
107
Member Avatar for caps_lock

With the code below I am getting an error reading long cannot be dereferenced, how can I solve this problem? [code] import java.io.File; public class TestingClass { public static void main( String [] args ) { File actual = new File("."); for( File f : actual.listFiles()) for( File e : …

Member Avatar for ~s.o.s~
0
370
Member Avatar for l_03

[ICODE] import java.io.BufferedReader; import java.io.FileReader; import TokenizerProcess.StringTokenizer; import javax.swing.JOptionPane; public class ReadFile { public static int count = 0; public static String[][]file = new String[6][3]; public void isReadFile(){ SubjectInput input = new SubjectInput(); try{ BufferedReader reader = new BufferedReader (new FileReader("SubjectFiles/subjects.txt")); String line; while((line = reader.readLine())!=null){ StringTokenizer tokenFile = new …

Member Avatar for ~s.o.s~
0
146
Member Avatar for radhasb

I am writing a program in which I have done ALOT of coding already but there are still problems and features to be added. So far my program: 1) Takes data from a .dat file and displays it on a table 2) There is a button for which you can …

Member Avatar for quuba
0
390
Member Avatar for dalbirsingh

Can u people help me in getting java code to transfer files (FTP) over the LAN.Give me the complete code for this. I wan that a FTP request to be send to the desired host and if the host accept the request then the browse menu be opened that allows …

Member Avatar for ~s.o.s~
0
169
Member Avatar for srinukatkam

I am using asp.net 3.5(visual studio 2008) and sql server 2005/2000. I want code for validation of Account number and password. i.e. when user enter the Accountno and password and click submit button it should check the data with that enter in database. If it is correct it should go …

Member Avatar for Ramy Mahrous
0
83
Member Avatar for letlet_pogs

Hello, have a good day everyone. I am confused if what elements are to be inserted in a queue. Are only numbers can be inserted in a queue? Are letters or word(e.g."Subject") can be inserted in a queue? Thank you ahead everyone. Have a nice day.

Member Avatar for ~s.o.s~
0
101
Member Avatar for leeba

I am trying to figure out how many ways you can go if you only take one or two steps. For example. If the number is 4 there are 5 ways you can move going one or two steps. I have to do it with recursion. I have the following …

Member Avatar for BestJewSinceJC
0
91
Member Avatar for radhasb

[CODE]public class table extends JPanel implements ActionListener{ JButton addInfo; public table(String dataFilePath) { JTable table; model model; Font f; f = new Font("SanSerif",Font.PLAIN,24); setFont(f); setLayout(new BorderLayout()); model = new model(dataFilePath); table = new JTable(); table.setModel(model); table.createDefaultColumnsFromModel(); GridLayout layout = new GridLayout(80,30); addInfo = new JButton("Add Data"); addInfo.setSize(80, 30); addInfo.addActionListener(this); //action …

Member Avatar for Ezzaral
0
115
Member Avatar for metemostan

I am a begginer and i know almost nothing in java. our prof has asked me to write a program that computes 50 employees salary (normal,overtime and bonuses) ,print the result and keep a back up. can somebody please help me write the code.

Member Avatar for BestJewSinceJC
0
135
Member Avatar for srs_grp

I want to connect to sybase from java using jdbc:odbc bridge.. Which driver should I use like I have used "ODBC for Oracle" Plz help..

Member Avatar for Ezzaral
0
129
Member Avatar for dinkarkolhe

Dear Friends I have working knowledge of java. but when it comes to make a java reportsi don't know how to proceed. will any one help by guiding me or by providing me some tutorials to make reports in java. i am unable to visualize a solution. i don't understand …

Member Avatar for Ezzaral
0
84
Member Avatar for blumisa

Help .. I'm supposed to make a java program that will create an output of increament whre the last number is 10 and the series is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .. it's like counting to 10.. we're supposed to use a do-while loop or …

Member Avatar for iyercb
0
84
Member Avatar for dmanw100

I'm a computer science major with a background in C++, not Java. My professor told the class that the Scanner class has a nextInt(), nextDouble(), nextFloat(), etc for every primative type. But whenever I try to use nextChar(), the compiler gives me an "undefined symbol" error. That means that there …

Member Avatar for stephen84s
0
375
Member Avatar for ezkonekgal

hello.. i really need help.. I don't know why i keep on getting an empty stack if i pop a token from stack even if user has already push a token into it.. [code=java] public class MStack implements Stack{ public Node top; public Node[] stack; public static int T[]; public …

Member Avatar for ezkonekgal
0
231
Member Avatar for kinjal1717u

i want to make one website in jsp.. ... can any one help me....about coding....plz....

Member Avatar for verruckt24
0
79
Member Avatar for priya_gurnani

actualy i need help i m making a software in java swing i hv a problem in retriving values from database in JTable, i m inserting values in database ms access it works, following is my code one is for database another one for table ..................................................................................................................................... [code] import java.sql.*; public …

Member Avatar for javaAddict
0
99
Member Avatar for l_03

hello guyz,,i just want to ask if you know a site that have a free ebook that would explain best the data structures..we have a problem to code..and it is about queues,,and sorting,,and i hope to find a best ebook that will explain best about the sorting and the queues,,,thanks …

Member Avatar for verruckt24
0
142
Member Avatar for mukesh.dagar

Dear Friends I have working knowledge of java. but when it comes to make a java projects i don't know how to proceed. will any one help by guiding me or by providing me some tutorials to make my first project in java. i am unable to visualize a solution. …

Member Avatar for verruckt24
1
105

The End.