36,051 Topics

Member Avatar for
Member Avatar for anthonydonx
Member Avatar for jt86442
0
70
Member Avatar for Rajnesh

start Server first start Client by passing the ipaddress of the server eg; java Client 10.0.1.15 if an error pops up change the port in both Client and Server programs

Member Avatar for jt86442
0
3K
Member Avatar for momoryoma4488

Hi... i hope there's someone who can help us think about the concept that we may use in order to create a website using java language... we are not allowed to use other language... and honestly we are not that good in that language... Hope that you can help or …

Member Avatar for jt86442
-1
61
Member Avatar for Rajnesh

I was creating a chat application in Java Swing/Socket Programming. The same when I created in non GUI app. it worked [url]http://www.daniweb.com/code/snippet448.html [/url]. But in GUI, they can't connect now. I have tried it thru many ways but still m getting errors for connection. Can anyone can help me...... /********************* …

Member Avatar for anthonydonx
0
260
Member Avatar for fsl4faisal

abstract class A { abstract void callme(); void callmetoo() { System.out.println("this is concrete method"); } } class B extends A { void callme() { System.out.println("implementation of callme"); } } public class abstractdemo { public static void main(String []args) { B b=new B(); b.callme(); b.callmetoo(); } }

Member Avatar for NP-complete
0
197
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Specifically, I need to call a program I wrote in python while in java. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for Stefano Mtangoo
0
102
Member Avatar for chinee

I don't understand why my labels are not coming up when i run the code are the JComboBox to big or what? [CODE]import javax.swing.*; //import javax.swing.AbstractButton; import java.awt.*; //import java.awt.event.ActionEvent; //import java.awt.event.ActionListener; public class floralOrderGUI { JButton submitButton = new JButton("Submit"); public static void main(String[] args) { new floralOrderGUI(); //system.exit(Q); …

Member Avatar for NormR1
0
90
Member Avatar for chinee

i am trying to extend a splashscreen window ti 15 minutes can anyone help. [CODE]import java.awt.*; import javax.swing.*; public class flowerOrder extends JWindow { private JProgressBar bar; private JLabel ImageHolder; private ImageIcon myImage; private int i; public flowerOrder(){ setBounds(60,60,600,600); //set location and size of the window getContentPane().setBackground(Color.BLUE); //set the background …

Member Avatar for chinee
0
122
Member Avatar for mbaker3

Some background I have about 1000 objects of the same class that are created from parsing a text file. The class holds 4 short (~20 characters) Strings and 2 ints. I plan to make an application that uses these objects (a sort of map if it matters). I would prefer …

Member Avatar for NormR1
0
84
Member Avatar for Member 785174

Hi. I am working on a program in which the user enters a series of integers, and the program displays the highest and lowest integers after the user inputs -99. My problem is initializing the variables; I have no clue how to make my loop work in all cases, just …

Member Avatar for NormR1
0
138
Member Avatar for Member 785230

Hiya, I have a int x = 28492374 and need to add every other digit together and then later do other stuff with the digits like take every other digit and multiple by two then add each digit together. Anways i dont know the method call out a single digit …

Member Avatar for Prateek Jauhari
0
93
Member Avatar for hasbeenbad

I have a web app that creates an employee.txt file, how do I go about printing the contents of the file from a form? [CODE]<%-- confirmation.jsp --%> <%@ page session="false" import="java.util.*" %> <%@page import="java.io.InputStreamReader"%> <%@page import="java.io.BufferedReader"%> <%@page import="java.io.DataInputStream"%> <%@page import="java.io.FileInputStream"%> <%--Retrieve the Employee and Hiring beans from the Request scope--%> …

Member Avatar for NormR1
0
135
Member Avatar for knowledgelover

Hi all I am new to SIP implementation specifically using SIP, I need to use it in a Call Center, as a PBX, in other words, to write the PBX server , and the clients call each other, all are SIP, where to start from , links, tutorials would be …

Member Avatar for onstate
0
126
Member Avatar for hermann87

Hello again, another question today... Based on this example : [CODE] public interface A { public boolean booleanA = true; public boolean booleanB = true; public boolean booleanC = true; } public interface B implements A { public boolean booleanA = false; } public class Example implements B { public …

Member Avatar for NormR1
0
80
Member Avatar for Zetlin

Hello everyone, first of all I would like to say that I'm new to java and I'm getting this error while trying to compile a program from a book that I am using to learn the language. Ok so the program is very basic just two classes here is my …

Member Avatar for javaAddict
0
1K
Member Avatar for adams161

I use almost every day, [url]http://www.mibbit.com[/url] It's a web client for IRC. It has one real nice feature. when i type, if i misspell a word, it sort of writes a line through the word, and i can right click for spelling suggestions. I think actually it might be my …

Member Avatar for askkuber
0
159
Member Avatar for daudiam

[CODE]ReferenceQueue rq=new ReferenceQueue(); SoftReference <class> ob=new SoftReference<class>(object_of_class,rq);[/CODE] The API says that all weak and soft references are cleared as they are enqueued. So, for the above code, as soon as the JVM sees that "object_of_class" is softly reachable, it will enqueue it, and clear the soft reference. "clearing the soft …

Member Avatar for daudiam
0
100
Member Avatar for daniiii

Hi guys, First, many thanks for reading my post, happy to have found you! I have data(objects) that is stored in a hashmap, my goal is to store this data in a JTable, using a separate cell for each entry, rather than starting on a new column each time. I …

Member Avatar for daniiii
0
182
Member Avatar for NewOrder

[CODE]import java.io.*; class Dictionary { public static void main(String[] args) { Console console=System.console(); System.out.println("Please enter the next number"); String input; input=console.readLine(); String[] Hebrew={"ehad", "shnaiim","shalosh","arba","hamesh","shesh","sheva","shmone","tesha","eser"}; String[] English={"one", "two","three","four","five","six","seven","eight","nine","ten"}; for(int x=0;x<Hebrew.length;x++) { if(input.equals(Hebrew[x])) { System.out.println(English[x]); } } } { while(!input.equals("enough") ) //i want to make a condition that if the program doesnt …

Member Avatar for NormR1
0
132
Member Avatar for khurram.1987

Hello. Actually not that much good in web development ... So i need little help in doing this work. I am creating realtime chating site in which i am having problem that how to send mesages to user's. I've read some simple example on internet they uses request to server …

0
69
Member Avatar for Member 785468

Hi all, I am in need of converting my java code to c. Do u have any idea about the converter software like c to java? Thanks.

-1
52
Member Avatar for Member 784790

I m working on a project. And in it i get problem for pattern matching.I have ipv4 ip address for ex " 127.3.0.1* ".I have to generate regular exp for pattern matching in Java.Can you guide me what can be its regular exp. thanks, preeti

Member Avatar for peter_budo
0
101
Member Avatar for orcboyx
Member Avatar for javaAddict
-1
886
Member Avatar for fsl4faisal

interface A { public boolean bA=true; public boolean bB=true; public boolean bC=true; } interface B extends A { boolean bA=false;/*(here bA i think is ambiguous how does compiler know which value to take )* } class C implements B { public void printbool() { System.out.println("bA="+bA); System.out.println("bB="+bB); } } public class …

Member Avatar for JamesCherrill
-2
110
Member Avatar for prem2

Hi Daniweb team, I need to understand newinstance in java.I do no how to implement it and i tried this program but getting some errors. 1.Can anyone tell me how to use new Instance and what mistakes i have made in this program.? [code] import java.io.*; public class sample { …

Member Avatar for prem2
0
102
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for jcao219
0
118
Member Avatar for pinsickle

In reguards to the remove function, what happens if you remove and item from the middle of this list? For example, say the list size was 5 (elements 0 - 4) and element 3 was removed. Would element 3 now contain a null value or would everything past element 3 …

Member Avatar for pinsickle
0
126
Member Avatar for Brandon515

ok what i'm trying to do is make a pong game in an applet. here's my code: [CODE]//<applet code = Pong width = 800 height = 600></applet> import javax.swing.*; import java.awt.event.*; import java.awt.*; import com.bruceeckel.swing.*; public class Pong extends JApplet implements KeyListener { int px1 = 770, px2 = 20, …

Member Avatar for NormR1
0
108
Member Avatar for The king

hi all, hope u r fine, i need a help in how to create a hidden txt file from java code and write to and read from it ,, regards :)

Member Avatar for NormR1
0
66
Member Avatar for Dehatim

I am taking my first class in Java and am having problems with converting lowercase letters to uppercase and am not having success. The program compiles and executes. However, the lowercase letters input by the user are not converted to uppercase. I think the problem is very simple, but I …

Member Avatar for Member 784908
0
703
Member Avatar for bondito

I am a final year computer/networks student, i would like to build a chat/video communication system between two computers or more.I need advice on what sort of software/develpoment methods is required to build the system. I was thinking of using Java to program the system, but really dont know where …

Member Avatar for Nick Evan
0
214
Member Avatar for prem2

Hi daniweb team, I need to understand newinstance in java.So i tried the below program and got the error. Can any one know how to write the newinstance program and explain the code. import java.io.*; public class sample { public static void main(String args[])throws IOException{ one obj=one.newinstance(); obj.one(); } } …

Member Avatar for javaAddict
0
87
Member Avatar for Member 784795

A program that will ask only 3 times for inputting the correct password. The input/output in main.'Four user defined methods -add(), multiply(), arraymanipulation(), stringcases(). While or do-while should be used to repeat the process. On the: arraymanipulation() - input three integers then get the sum and average(2 Decimal only) using …

Member Avatar for javaAddict
0
71
Member Avatar for asad_80

Hi, I am writing a program to change the image of the button when it is clicked and image gets replaced to the original image when the button is clicked again. Have used array of button to do this. I have used integers whose value will continue to change as …

Member Avatar for NormR1
0
102
Member Avatar for yap_1991

Hi All I really need help in this. Im supposed to "extract" information from text files . the text files looks somethings like this: MODEL 1 ATOM 1 N SER A 253 -19.559 -25.512 -41.130 1.00 0.00 N ATOM 2 CA SER A 253 -18.749 -26.500 -41.895 1.00 0.00 C …

Member Avatar for NormR1
0
644
Member Avatar for merinajose

Hi I need code for searching the records in a table for specified conditions using jsp

Member Avatar for Member 784740
0
1K
Member Avatar for NewOrder

[CODE]import java.io.*; class Ex33 { public static void main(String[] args) { Console console=System.console(); System.out.println("Please enter the next number"); String input; input=console.readLine(); int n1; n1=Integer.parseInt(input); int sum=0; int sum2=0; int input2=0; input2=n1; int count=1; char dot=','; String Number=""; int RealNumber2=0; String All=""; String RealNumber=""; while(count<5) { System.out.println("Please enter the next number"); …

Member Avatar for Unbidden Ghost
0
170
Member Avatar for Stefano Mtangoo

Hi, I'm beginning JDBC and I'm conversant in SQL. But I need to Connect to database and that where the problem lies. All I have done is adding mysql/j connector Jar to Netbeans project and wrote code below to test. It cannot connect to database. Also IDE throws error: [CODE=JAVA] …

Member Avatar for Stefano Mtangoo
0
490
Member Avatar for daudiam

When a variable goes out of scope in Java, is it immediately removed from stack and one strong reference to the object it pointed to removed ?

Member Avatar for daudiam
0
4K
Member Avatar for leiger

I have imported the Apache XML-RPC jar files, and got them working (has taken me all day to figure out how to get it working - so I'm kind of frustrated at the moment ;D) ... but that used the execute(..) method which requires two parameters ... there was no …

Member Avatar for leiger
0
2K
Member Avatar for SerialSpiller

only 1 error. the compiler says it 'cannot find symbol' in the line of code approximately 12 rows down that reads "Payroll employee = new Payroll();". Thank You[code]import java.util.Scanner; // Needed for the Scanner class public class PayrollDemo { public static void main(String[] args) { //Declare vaiables String name; int …

Member Avatar for peter_budo
0
88
Member Avatar for Hunter2379

Hello. I want to convert a byte[] array to a string, then post it on JTextArea without having it do this: [url]http://img706.imageshack.us/img706/3342/outputc.jpg[/url] [url]http://yfrog.com/jmoutputcj[/url] [url]http://yfrog.com/5soutput2j[/url] [url]http://img208.imageshack.us/img208/7049/output2.jpg[/url] Any ideas???

Member Avatar for peter_budo
0
70
Member Avatar for abbyo

I'm having problems figuring where I need to go next in this project to create an applet from this application... any suggestions where I should start (in layman's terms)? [CODE] import javax.swing.*; public class storageSP { public static void main(String[] args) { //declare variables float res; String kfilm; String sfps; …

Member Avatar for NormR1
0
218
Member Avatar for leiger

I am attempting to access an XML-RPC API method using a Java client. I'm fairly certain that the server is written in Python. The API is part of the wiki farm Wikidot.com API info: [url]http://www.wikidot.com/doc:api[/url] API method info: [url]http://www.wikidot.com/doc:api-methods[/url] Does anyone here know what the equivalent of this statement is …

Member Avatar for leiger
0
549
Member Avatar for student.09

Hi, I need help getting started on this program: Write a sort method that uses the bubble- sort algorithm. The bub-ble- sort algorithm makes several passes through the array. On each pass, suc-cessive neighboring pairs are compared. If a pair is in decreasing order, its values are swapped; otherwise, the …

Member Avatar for student.09
0
324
Member Avatar for bibiki

hey there, I have two pieces of code that I expected would behave the same. However, what I noticed is that one of them works fine, the other does not at all. I need help from someone experienced to explain what's going on under the hood. the code that does …

Member Avatar for NormR1
0
138
Member Avatar for mikaelaillanes

Hi! I have a problem with a binary tree programing (AVL)where I have to check if it is or if it isn't balanced.... I have made a start but I know it isn't right... [CODE] public boolean isBalanced() { boolean balanced = true; isBalanced(root, balanced); return balanced; } private void …

Member Avatar for NormR1
0
200
Member Avatar for shingo99

hi im a beginner in Java i have make a simple program using the JCreator LE but when i execute file the error below is shown in the command prompt Exception in thread "main" java.lang.NoSuchMethodError: main may i know what is the matter? thank you in advance

Member Avatar for Cort3z
0
516
Member Avatar for Cort3z

Hi. I got a noobish question: Is it possible to return an array "directly", so, something like this. [CODE] public int[] getArray(){ return int[]{this.intA, this.intB}; } [/CODE] I know I can just make the array first. But does this not use unnecessary cpu time and memory? This is going to …

Member Avatar for Cort3z
0
110
Member Avatar for Member 784291

how to make a program run when an external device is plugged in???(program run from the computer not an autorun from the flash)

Member Avatar for NormR1
0
66

The End.