32,204 Topics
| |
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); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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--%> … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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. | |
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 | |
Is there an easy way to convert a simple integer into a boolean type? | |
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 … | |
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 { … | |
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 | |
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 … | |
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, … | |
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 :) | |
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 … | |
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 … | |
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(); } } … | |
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 … | |
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 … | |
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 … | |
[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"); … | |
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] … |
The End.