32,199 Topics

Member Avatar for
Member Avatar for ceyesuma

My MASKFORMAT is "##:00" which allow rounded hours but can I include that ## can only contain [0-23]? what would that code look like? [code] private PropertyChangeSupport propertySupport; public static final String PROP_TICKING_PROPERTY = "clock is active"; //public static final String MASKFORMAT = "##/##/#### ##:##:## UM"; public static final String …

Member Avatar for ceyesuma
0
298
Member Avatar for Tellalca

I have developed a program where I do some database connections and send some queries with JDBC to MySQL database called ANU. I have used NetBeans 6.9 under Ubuntu 11.04 as platform. When I run the app from NetBeans, it works perfectly but when I try to run it from …

Member Avatar for peter_budo
0
193
Member Avatar for mutazzaki

hi all plz i need java code to read avi header information such as frame rate and hight and file size tks

Member Avatar for mutazzaki
0
59
Member Avatar for mudi12

Hello I am student of BSCS 4th Semester. we studied basics of java in OOP subject i want to make a 3D Paint in java simple free hand diagrams by using sphere.. drawing on different coordinates.. [CODE]/** * * @author MuDi */ import com.sun.j3d.utils.geometry.*; import com.sun.j3d.utils.universe.*; import java.util.Scanner; import javax.media.j3d.*; …

Member Avatar for mudi12
0
258
Member Avatar for masterofpuppets

Hi all, Here's the problem I have. I am designing a website in HTML and I want to include a chat system using a Java applet. I have written a small example applet that just connects to my server and gets the users that are currently online. The applet works …

Member Avatar for masterofpuppets
0
285
Member Avatar for stevanity

I was reading Programming with java for Dummies 2nd Edition and came across this piece of code. I tried to read a chrachter using scannerobj.findInLine(".").charAt(0) method. But I get an exception saying theres no such method. And even nextLine, nextWord isnt working. Please help. I have pasted the exact code …

Member Avatar for stevanity
0
437
Member Avatar for Nirmeen Ased

Hi every body .. i got these problems with my code when ever i choose "no" as an answer .. it requires me to create an a count while i don't want to create one .. another problem occurs when i use the Acounte_Number to be the ID for the …

Member Avatar for Nirmeen Ased
0
296
Member Avatar for Bubbleboy

I recently wrote a java jar file that takes the current date and time and puts it into a text file. What i want to do is put this into a users startup folder so i know when they got on to the computer. However, if the jar is in …

Member Avatar for Bubbleboy
0
3K
Member Avatar for masterofpuppets

Hey, I am not sure whether this is the right place to ask this but I figured that maybe someone here has used JFileUpload for uploading files to a server. I just downloaded the applet and tested it out on my server and uploading works as long as the files …

Member Avatar for masterofpuppets
0
254
Member Avatar for warlord902

Something similar to it is cross-posted here : [url]http://stackoverflow.com/questions/6275685/problem-getting-shared-status-of-gtalk-using-xml[/url] I am not getting replies there so posting it here again. I'm using smack 3.2 I have two queries: 1) How can we get the nick name or the name actual name of the user not the JID that is logging …

Member Avatar for warlord902
0
264
Member Avatar for amalwit

[CODE]class A{ A a=new A(); void method(){ System.out.println(a); } public static void main(String args[]){ A b=new A(); b.method(); } }[/CODE] This code gives a run time error.What is the wrong with this code

Member Avatar for JamesCherrill
0
160
Member Avatar for wolfrain62

So I am kinda new to java and was given a program to do. a. Create one or more arrays to hold the names of the months and the number of days in each month. Assume that February always has 28 days. b. Display the contents of the array(s). c. …

Member Avatar for wolfrain62
0
107
Member Avatar for ceyezumma

Hello. I hava DAO classes to access tables of a Derby db. My DAO's all implement there own interface. I knew I would need to learn what this was. Is anyone farmiliar with how an application would use an interface for the DAO classes ? I use xml properties to …

Member Avatar for ceyezumma
-1
165
Member Avatar for Zwinky

[code]import java.awt.*; import java.awt.event.*; public class DataEntry { public static void main(String[] args) { Frame frm=new Frame("DataEntry frame"); Label lbl = new Label("Please fill this blank:"); frm.add(lbl); frm.setSize(350,200); frm.setVisible(true); frm.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); } }); Panel p = new Panel(); Panel p1 = new Panel(); Label jFirstName …

Member Avatar for stultuske
0
88
Member Avatar for asterix15

what is the use of making a variable public. After all the client is provided only with the .exe code So now whats the actual use of maling a variable private?

Member Avatar for stultuske
0
100
Member Avatar for Mr. pen

Hii all :D How are you ? Hope Everything is gr8 first ,sorry for any language mistakes , but English is not my native language :) This is my Code which has 5 class 1. district. 2. region. 3.MinsteryOdEducation 4.main 5.SchoolGroup all the codes are below .. I design it …

Member Avatar for Mr. pen
0
184
Member Avatar for arka.sharma

Hi All, I am trying to write a program that will take a straight line,circle,square or some regular geometric shape as an image.And tell which geometric figure it is.Anybody give me some idea where to start. Thanks and Regards Arka

Member Avatar for JamesCherrill
0
130
Member Avatar for arka.sharma

Hi, Can anyone tell me that given a set of co-ordinates but not the centre and program will test whether these points are on the locus of some circle. Regards Arka

Member Avatar for JamesCherrill
0
67
Member Avatar for bangor_boy

Can someone please explain break statements to me, as far as i understand a break statement leaves the loop before it has ended. But i run this code and expect to get "Zero" "One" But I get "Zero" "One" "One" "Unknown number" [CODE] for (int i = 0; i < …

Member Avatar for stultuske
0
178
Member Avatar for warlord902

I have some doubt regarding how class variable gets initialized, both static and non static. I mean, suppose I have a class like below. [CODE] public class MyClass{ public static HashMap<String,Buddy> buddiesMap= new HashMap<String,Buddy>(); public static ArrayList<String> buddiesList=new ArrayList<String>(); public static HashMap<String,ImageIcon> avatarMap=new HashMap<String, ImageIcon>(); public static ServerConnection con=new ServerConnection(); …

Member Avatar for thekashyap
0
566
Member Avatar for winecoding

I am learning to use mahout by starting with a example copied from the book. However, the eclipse compiler gives me the following message: [QUOTE]Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.mahout.cf.taste.impl.model.file.FileDataModel.<clinit>(FileDataModel.java:119) at mia.recommender.ch02.RecommenderIntro.main(RecommenderIntro.java:18) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at …

Member Avatar for thekashyap
0
201
Member Avatar for marsangel

Hi! I just want to ask if anyone knows how to partition a USB? Any other forums would reply and tell me to use a 3rd party software which is not very helpful since I need to develop my own program. Research says that in order to partition a USB …

0
61
Member Avatar for sunnynight

Dear Friends, This is my homework, I have a text file containing the following content: [QUOTE]0 12 1 15 2 6 3 4 4 3 5 6 6 12 7 8 8 8 9 9 10 13[/QUOTE] I want to read these integers from data.txt file and save the two …

Member Avatar for hfx642
0
194
Member Avatar for vomhaus

I wrote a method to read in a txt file and then return the value(s) line by line. However, the value(s) are being returned as such - [Ljava.lang.String;@6f579a30. I would have expected something different. The .txt file I'm reading in has value(s) in the file like this... A B C …

Member Avatar for NormR1
0
137
Member Avatar for winecoding

I am trying to save an integer matrix to the csv file. My code is listed as follows. [CODE]try { FileWriter writer = new FileWriter("test.csv"); for(int i = 0; i < row; i++) { for (int j=0; j<(column-1); j++) { writer.append(Matrix[i][j]); writer.append(','); } writer.append(Matrix[i][j]); writer.append('\n'); writer.flush(); } writer.close(); } catch(Exception …

Member Avatar for hfx642
0
117
Member Avatar for warlord902

Suppose I have four classes in a package named T namely Main, A, B and C The class Main contains public methods which the classes outside package T access and Main class in turn communicate with other three classes and let some function to happen. Now I want only a …

Member Avatar for warlord902
0
169
Member Avatar for netci

hi, my arraylistS in a covering arraylist behave like the same instance. i manupulate one of them with [CODE]i=0; manupulate(myarrofarrs.get(i));[/CODE], and all the sub arraylists have become effected of the manupulation. i googled a little but in google it was said: "create new instance with myvar=new myobject()" i have already …

Member Avatar for JamesCherrill
0
202
Member Avatar for webmasts

HI, I need some help on using the math.pow() function to solve the following problem: a^n = p(1+ r)^n how would I translate it using math.pow() Thanks for your suggestions and any help!

Member Avatar for Donkerster
-1
1K
Member Avatar for stevanity

I created the following package AccBal. [CODE]package AccBal; public class AccountBalance { private String Name; private double Balance; public void setData(String name, double balance) { Name=name; Balance=balance; } public void displayBalance() { System.out.println("The Account Balance of " + Name + " is $"+Balance); } } [/CODE] Then I created a …

Member Avatar for stevanity
0
241
Member Avatar for neutralfox

Hello friends, I am having a small problem, i have already designed a chat application, the chat works fine over a local network but now I want to use it over the internet. Logically the program should but what happened is that to get the IP I have used [code] …

Member Avatar for kumarprabhug
0
6K

The End.