35,618 Topics
![]() | |
hi can u tell me how to connect to oracle from jsp please.i | |
Hi guys i've written a hash table as a collection for a program the key is a string, show below: [CODE]private Hashtable<String, Planes> planesFlying = new Hashtable<String, Planes>();[/CODE] How can i write a comparator to sort this into alphabetical order? i've tried a lot. Do you need to overide equals … | |
So, a while ago I wrote a SerializableImage class in order to easily bundle several images together into a single file. The class worked fine, both serializing, file I/O and drawing. In another project I'm working on I successfully used a copy of this SerializableImage class, until recently. I had … | |
I would like to find out do we declare a class as persistent only when it represents the data in the database. In other words when we create a persistent object then we can store the state of the object into the database. | |
Hi, Please guide on whats the best practice to return multiple rows in JWS to the consuming client application. Currently i'm using Netbeans 6.7. Thanks. | |
![]() | Hi I would like to know which of the following is correct uni-directional association between class A and class B.(A->B) 1. [CODE] class A { int num; B obj_B; A(){ //constructor code; } } class B { int num; B(){ //constructor code; } } [/CODE] 2. [CODE]class A { int … |
[CODE]//PizzaPanel.java Author: Carien Anderson import java.awt.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.JOptionPane; import java.awt.event.*; public class PizzaPanel extends JPanel { public PizzaPanel() { setLayout(new BorderLayout()); setBackground (Color.white); setPreferredSize (new Dimension(700,280)); //North panel JPanel ppan1 = new JPanel(); JLabel l1 = new JLabel("Lets Eat!"); ppan1.add(l1); ppan1.setBackground(Color.green); add(ppan1, BorderLayout.NORTH); //West panel JPanel … | |
Hello! I would like to ask on how to create a node using GUI (pseudo code will really help) . It seems that my code does not create a node. I used JLabels and ActionListener to retrieve the data from the JLabels. My plan is to input all the necessary … | |
I am a uni student just starting out with java and getting more confused by the day. Can someone tell me what I have done wrong? It should input all of the strings and place them in the appropriate place in the bottom sentence. [code]import java.util.Scanner; // Needed for the … | |
Hi, I have used the following code (this is from HeadFirst Java Book) [CODE] import java.awt.*; import javax.swing.*; import javax.sound.midi.*; import java.util.*; import java.awt.event.*; public class BeatBox { JPanel mainPanel; ArrayList<JCheckBox> checkboxList; Sequence sequence; Sequencer sequencer; Track track; JFrame theFrame; String[] instrumentNames = {"Bass Drum", "Closed Hi-Hat", "Open Hi-Hat", "Acoustic … | |
i need some example code. | |
How does Priority Queue work. This is my scenario, I have certain objects with priorities 1,2,..10. There could be multiple objects with same priority. I was thinking I can put them into a priority queue and let the pool() give me the objects with highest priority.. ? I m kinda … | |
I have a 2d array with x and y coordinates. I need to figure out the north most, south most, east most, and west most points and print them out. I figure the best way to do this is to find the minimum x value and the corresponding point will … | |
I have a series of of JOptionPanes pop up to get info from the user. However, if the user presses cancel, the machine gets an error (which is prevented). I'm trying to catch this and force the user to make a choice and press OK. MY code doesn't seem do … | |
[code] import java.io.*; import java.lang.*; import java.util.*; class CustomerInfo { public String name = new String(); public String accnNumber =new Sting(); public String accnType = new String(); public float balance = 0.0F; public float rateOfInterest =0.0F; public float interest = 0.0F; public float useBalance = 0.0F; public String password = … | |
i have written a java prg that reads a jpeg image&gives height,width of the image.I want to store the output in a separate file .How can I do this? | |
can anyone explain with me briefly of instance variables and local variables. | |
How do you store an array into another array? can you store a multidimensional array into an array? if so how? | |
I got 2 machines both has the same operating system (Linux based), lets name these machines as PC 1 and PC 2. PC 1 has a hello world program that displays in a GUI, when we pass the command " java helloWorld smith " (smith is the parameter), and we … | |
Hey guys I'm using Tiled (mapeditor.org) for the mapping in my game and I have made a few maps, and started implementing them in my game. The first thing I had to do was decode them from base64, then gunzip the string. Now I am on the last step and … | |
Why does this give the error "cannot reference this before supertype constructor has been called" I thought that is the first thing I did in the constructor. [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package application1; import … | |
Hi How can i know in java , pc is connected to internet or no (is online or offline) ??? thanks | |
Hi, I have little experience with writing to Http socket. I am trying to send data to another computer through Http protocol, just like having a chat between two application but instead of using Socket connection I want to use Http connection. The server writes to [I]http[/I] connection data and … | |
i m working with this program but dont know how to add counter in it in order to check running / execution time of program.please help me. and telll how and where to add code for this task?plz reply soon. public class InsertionSort{ public static void main(String a[]){ int i; … | |
Hello. I am constructing a database using GUI. I wanted to have all my containers to be on one window. I am having a problem on how to have these containers on one window. Any suggestions? I am very sorry if the code was seem weird. Here's the code: [CODE]public … | |
this is my code where i am putting values to the checkbox value by getstring i getting problem when displaying the value of checkbox value which displays"Undefined" please give some solution. where i want to get the value of my checkbox which i have been selected | |
Split from - http://www.daniweb.com/forums/thread30207.html > Here's the program that I wrote, but I'm having problems with my ending balance and overdraft fee. The overdraft fee is multiplied by whatever amount I enter: can some help; here's the program: import java.io.*; import java.lang.*; public class BankAccount5 { public static void main(String[]args)throws … | |
This is my first post in the Dani community. I am brand new to java, 5 weeks into an intro to computer programming course. My assignment is to create 10 random numbers between 50 and 100. Then I am supposed to sort them from lowest to highest, find the average … | |
im working with this program for merge sort. i want to add a counter in it in order to check running / execution time ofd program. please help me. please reply soon. public class mergeSort{ public static void main(String a[]){ int i; int array[] = {12,9,4,99,120,1,3,10}; System.out.println(" Selection Sort\n\n"); System.out.println("Values … | |
What are rules to observer when writting More than one class in single Java file. Let say three classes on the same file Thansk |
The End.