32,199 Topics
| |
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 … | |
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 … | |
hi all plz i need java code to read avi header information such as frame rate and hight and file size tks | |
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.*; … | |
| 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 … |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
[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 | |
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. … | |
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 … | |
[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 … | |
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? | |
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 … | |
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 | |
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 | |
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 < … | |
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(); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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 … | |
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] … |
The End.