32,199 Topics

Member Avatar for
Member Avatar for GlenRogers

Hi, this is part of an assignment question and probably something I should know. I have 2 classes. I have a method in one class that creates an instance of the other class and sets one of its attributes to a certain value. The class that has its attribute set …

Member Avatar for GlenRogers
0
230
Member Avatar for miaa

hi i am a 3rd year Bsc student and i have to do a project on "Text To Speech Conversion and Speech Recognition", as part of my college project, and i want to implement it as a mobile app..so plz help me with some suggestion..

Member Avatar for trishtren
0
112
Member Avatar for deshazer.jad

My application has a lot of buttons on it, and in order to create a skin for my application, I've been just creating a lot of images in my working directory and loading them all into my application as ImageIcons. I like working with ImageIcons, but not working with a …

Member Avatar for deshazer.jad
0
265
Member Avatar for gosensgo87

**Hello i am a noob when it comes to java so sorry if its obvious but the code below is giving me a error when i try to compile it, the error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at goodcalculator.main(goodcalculator.java:127). Can anyone help me? ** CODE: import …

Member Avatar for JamesCherrill
0
303
Member Avatar for skiabox

I want to bring to my desktop java application real-time data from three market indexes of the world (Japan, Frankfurt, and Nyse). I only need these three quotes. Is it an easy task?

Member Avatar for rfq
0
74
Member Avatar for brunoccs

"The method overriding is an example of runtime polymorphism. You can have a method in subclass overrides the method in its super classes with the same name and signature. Java virtual machine determines the proper method to call at the runtime, not at the compile time." Why not at compile …

Member Avatar for JamesCherrill
0
147
Member Avatar for godzab

I would like to keep on checking a JTextField until the field equals ten digits. When the JTextField equals ten digits then an event will happen. I want to do this without a button. Here is what i tried to do: JTextField get = new JTextField(10); String a; public className(String …

Member Avatar for softswing
0
566
Member Avatar for breakid

Hi, I want to implament a simple tcp client and server. but I want my clien do I need to init the socket before every time I'm sending message to the server ? This is my client: class TCPClient { public static void main(String argv[]) throws Exception { String sentence …

Member Avatar for JamesCherrill
0
147
Member Avatar for rahul.ch

class Dog { public void bark() { System.out.println("Dog bark"); } } class Hound extends Dog { public void bark() { System.out.println("Hound bark"); } public void sniff() { System.out.println("Hound sniff"); } } public class CastingMethodCall { public static void main(String r[]) { ((Dog)new Hound()).bark(); //((Dog)new Hound()).sniff(); } } On executing above, …

Member Avatar for JamesCherrill
0
259
Member Avatar for rahul.ch

class Mixer { Mixer() {} Mixer(Mixer m) { m1 = m; } Mixer m1; public static void main(String args[]) { Mixer m2 = new Mixer(); Mixer m3 = new Mixer(m2); m3.go(); Mixer m4 = m3.m1; m4.go(); Mixer m5 = m2.m1; m5.go(); } void go() { System.out.println("hi"); } } The answer …

Member Avatar for sepp2k
0
260
Member Avatar for tandex

some people say that multiple inheritance in java is not needed because we have interfaces or that using singular inheritance can bring the same results as using a multiple inheritance. But that is not the case. Lets take a look at the example I call “The Workbench Example” say we …

Member Avatar for stultuske
0
409
Member Avatar for millroy

hi i have created a j2me application which uses gps but wen it wants to use gps it prompts out a message to comfire its usage over location services. now i want to know how to make location servies to be used my default by the cellphone. i know its …

Member Avatar for saisyam.dampuri
0
140
Member Avatar for skiabox

I have created a JFrame with two JPanes (mainPanel and secondPanel)in it. I am trying to update the first JPane (mainPanel) with a JPane that is returned by another class of the project. How can I do that? Thank you.

Member Avatar for skiabox
0
159
Member Avatar for GlenRogers

I have made 2 classes; Customer and Repair. I have a map<String, Customer>(customerDetails). Customer objects hold a map<String, Repair>(repairs). My GUI has 2 JTextAreas, notes and results. In notes ou type some notes and when you choose save the notes appear in results and a new Repair is created with …

Member Avatar for GlenRogers
0
134
Member Avatar for skiabox

I have created a JMenuItem and a JButton. How can I have the same result when I use either the JMenuItem or the JButton? Basically I want them to trigger the same method. Thank you.

Member Avatar for JamesCherrill
0
101
Member Avatar for skiabox

I have created a JToolBar and I added 3 JButtons inside it. Is there any way I can increase the horizontal space between the buttons?(Now they seem like they're stacked together) Thank you.

Member Avatar for skiabox
0
174
Member Avatar for skiabox

I have created a form and I added a JFileChooser on it. When I start the form , the JFileChooser appears when the form loads. I gave used netbeans fileChooser tutorial.(http://netbeans.org/kb/docs/java/gui-filechooser.html) Any ideas? Thank you.

Member Avatar for skiabox
0
182
Member Avatar for rahul.ch

public class Thread8 implements Runnable { Demo d; public static void main(String r[]) { new Thread8().disp(); } void disp() { d = new Demo(); new Thread(new Thread8()).start(); new Thread(new Thread8()).start(); } public void run() { d.fun(Thread.currentThread().getId()); } } class Demo { static long f=0; synchronized void fun(long id) { for(int …

Member Avatar for JamesCherrill
0
229
Member Avatar for macca84

Hi, im trying to query an oracle db set up of table is all done and filling it is fine but when i try to send a query to the db using a resultset to store the outcome im getting the error "cannot convert int to ResultSet" ive looked at …

Member Avatar for lain00
0
739
Member Avatar for JakeA

Hi, How do you disable the minimize button in a JFrame. I only want to disable the minimize button, not the close and maximize button. Please help me with this one. Thanks.

Member Avatar for DavidKroukamp
1
2K
Member Avatar for FALL3N

hey, so I know if I use the drawLine() method, then I could change the line stroke/thickness with setStroke, but how do I change the thickness of a Line2D?

Member Avatar for FALL3N
1
644
Member Avatar for hszforu

This is my code: //VariableArguments3.java public class VariableArguments3 { static void test(String s,int ...v) { System.out.println("length:"+v.length+" String:" +s); for(int x:v) System.out.println("x="+x); } static void test(String s,double ...d) { System.out.println("length:"+d.length+" String:" +s); for(double x:d) System.out.println("x="+x); } } and //VariableArguments3.java public class VariableArguments3Test { public static void main(String args[]) { VariableArguments3.test("harshal",33,43,34,23,24); VariableArguments3.test("hosha",43,442); …

Member Avatar for hszforu
0
163
Member Avatar for hszforu

This is my code: //VariableArguments1.java public class VariableArguments1 { static void test(int ...v) { System.out.println("length:"+v.length); for(int x:v) { System.out.println("x="+x); } } } and //VariableArguments1Test.java public class VariableArguments1Test { public static void main(String args[]) { test(33,43,34,23,24); test(43,442); test(); } } Following are the errors i am getting: VariableArguments1Test.java:5: cannot find symbol …

Member Avatar for hszforu
0
130
Member Avatar for libathos

Hi,I'm writing a Java/Android application which consumes web services(these web services are written in .Net) from a certain URL.My problem is that some web services return to my application objects which are defined in .NET.Is there anyway my application can manipulate those objects?

0
91
Member Avatar for mydreamgirl

I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error: org.apache.catalina.startup.Bootstrap start -config "C:\Documents and Settings\user\jbproject\whoznextdoor\conf\server8080.xml" -nonaming Jun 23, 2012 8:22:47 AM org.apache.catalina.startup.Bootstrap main WARNING: Bootstrap: command "-nonaming" does …

Member Avatar for mydreamgirl
0
366
Member Avatar for skiabox

I have two panels. One with the price (OHLC) and a moving average, and one with the volume. I want to create a middle panel with to oscillators that oscillate around zero. Each oscillator is the difference of two moving averages of the chart above it. Is it possible? Thank …

Member Avatar for skiabox
0
197
Member Avatar for libathos

I want to consume a WCF service with DataContracts from my Android app, and I'm using Eclipse as my IDE. In .NET when I add a service reference I automatically get metadata and automatically-generated code for calling that service. Is there a way to do so in Java/Android/Eclipse? I wouldn't …

Member Avatar for libathos
0
123
Member Avatar for libathos

hi guys i need to develop an application and to do so i need to import in my project some web references.Does anybody has any idea how i can do that in eclipe(juno version)

Member Avatar for libathos
-1
412
Member Avatar for rahul.ch

Here when I execute the program, the output I'm getting on all the tries is 342 (naturally first 34 prints together then 2 seconds later 2 prints). My doubts is that is the order of start() [x.start() followed by y.start()] important in order of execution? Shouldn't the output be 234? …

Member Avatar for rahul.ch
0
264
Member Avatar for maredinaveen

hello everyone ,i am new to daniweb club i am so much happy to meet you here i am an MCA fresher i have confusion to get train in software technologies so please help and advise which technology presently in market .i am planing for datawarehousing please give your openions …

Member Avatar for hkwhitten
0
87

The End.