32,199 Topics
| |
Create a class called Factor that has a public method called calculateFactor. The method has two two arguments of type integer and checks whether the smaller of the two integers is a factor of the larger of the two integers. The method will return a factor or a zero. Write … | |
Write a Java application to print out the numbers 10 through 49 in the following manner: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 … | |
Hello, As you can see the title, i need help with the loop. Here is the code: [code] double t; for(t=0.5;t>2.5;t=t+0.1){ System.out.println(form.format(t)); } [/code] As you can see, the loop keeps going from 0.5 to 2.5. The main problem, that i cant understand how to make it count from 0.5 … | |
Hi! We have a project,to make a website in school, so one of the mandatory things is the registration form. so i can just copy from the example the teacher gave us and add some stuff, but i wanted to practice checking the form, and one of my "missions"(huh i … | |
Hi, Dear Friends i want to Pass AT Command to Mobile phone through Hyperterminal (Windows XP) from Java Application... The Hyperterminal passes the AT Commands to the phone, but i want to develop a java application, which pass the AT commands to the phone through Hyperterminal. please tell me how … | |
As a newbie i m facing a small prob right now... i have code to search names from many files and compare the results with similarity scoring. its working but when the names found my program should show the filepath or fileName for each names. how can i do this … | |
ok the other day i posted about how to actually display an image and then what the best way would be to read in a location of an image and then display it. Now my new question is how do you resize an image. At the moment the image i … | |
hi im janaka i tried to do the unit testing with JBuilder. download and install Junit set the class path. but according to the readme file, i was unable to test my installation. these are that instructions. [COLOR=DarkRed] add[B]junit-4.1.jar[/B] to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit-4.1.jar;INSTALL_DIR test the installation by … | |
hello i am stuk on this piece of work which i have no understaning at all!!! this is the question could someone please show me or give me gudlines in how to do it!!! Write a Java application that asks a user for their name and displays it in a … | |
Hi. I am writing a mac program that among other things, allows a user to create unix links to files. Now I am using the runtime.exec() method to run the ls -s command e.g. ls -s dir1/fileName dir2/NewfileName This works but becomes difficult if the path name to the file … | |
Ok, this is my second post...i will answer four with this rturn... wtf is with the the compiler not knowing I am making a variable known as the type I write?.. ((String)(Vector)(((Vector)((Vector)DesktopFrame.desktop.masterPane.iconPane.logoffFrame.secretData.uberSecretData.elementAt(1)).elementAt(ind + 1)).elementAt(2))) = label. Yes, Im a wannabeEverything...4 post ansers if I get One :) death | |
hello, could u pls tell me if there's any function which can allow java to decide what operator should use in order to return a min/max number? if yes.. i'd be happy to see it. i once saw something like this: [I]use "+,-,/" [/I].. followed by i don't know what.. … | |
Hi all Is there any class to store time in easily, without having to store a date too? We have to create a program for swimming competitions. The swimmers in a match need a time (the time they did swimming the match). So we only need hours, minutes, seconds and … | |
This isn't a programming how-to thread, but I've written a large graphics manipulation program in Java and I am developing a help section that explains how to use the program, a step by step tutorial for how to use all the features. I figure a good way for me to … | |
[code=java] class ListToolsFrame extends JInternalFrame { JLabel titleLabel; JButton exitButton; JTextArea outputArea; RandomAccessFile rafFile; ListToolsFrame(RandomAccessFile raf) { StringBuffer buf2; rafFile = raf; try { rafFile.seek(0); } catch (IOException e1) { System.err.println("rafFile.seek(0)"); } JPanel jp = new JPanel(new BorderLayout()); buf2 = listTools(); titleLabel = new JLabel("List Of Tools"); exitButton = new … | |
Hi everyone, I am a little new to Java programming and am doing a simple project. The Problem is that I am able to connect but am not able to send any data. It is a little weird. The server gets the client's IP and the client to is connecting … | |
Hey, Any suggestions on how to stop a IOException: Negative Seek Offset problem? -- Curtis | |
Hi, I'm doing a program that sends and receives message using SIP. I want to generate key pair for this program as i need the key pair to create certificates. I'm able to found key pair generation codes, but however when i call the key pair generated into the MIDlet, … | |
I recently started learning java and am trying to make a simple GUI program that takes in a location of an image and then displays the it. What would be the best way to do this?? | |
Okay, I basically have a menu bar with menuItems.. say just showTableMenuItem --> to display the table .... and addMenuItem() --> to add new record. I want to be able to display the table (when user clicks on the button), and then disappear the table and display the addMenu page(when … | |
Hi Guys (and Girls), Problem: Negative seek offset with respect to a RandomAccessFile's seek method. [code=java] private void writeRecord() { String v[] = inputUI.getValues(); raR = new RaRecord(Integer.parseInt(v[GeneralUI.RECORD]), v[GeneralUI.TOOLNAME], Integer.parseInt(v[GeneralUI.QUANTITY]), Double.parseDouble(v[GeneralUI.COST])); try { file.seek(raR.getRecordNumber()-1 * RaRecord.size()); } catch (IOException e1) { e1.printStackTrace(); } try { raR.write(file); } catch (IOException e) … | |
Hi, I'm attempting to program a fire emblem/final fantasy tactics sort of game. I'm having trouble getting the movement range to layout correctly. The way I'm doing it works, but most of the time gets stuck in an infinite loop, and doesn't always show all of the possible movement/attack locations. … | |
I was doing a bit of reading, and according to what I read, GUIs can be set up and realized in any thread, but doing more GUI work in a normal thread (non-EDT) after a call to setVisible can be dangerous. The explanation given is as follows: [QUOTE]The example constructs … | |
Hello, I need to read an xml file and store the information from it, into a tree struct in java. The xml format is the following: <room> <floor> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> <other tags>...</other tags> </floor> <ceiling> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> <other tags>...</other tags> </ceiling> <wall> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> … | |
Hi all, I have created a Backgammon AI player in Java, and I would like to know if anyone knows how I can play my player vs GNU Backgammon in order to test how well it does. Thanks | |
i have GUI class named 'myGUI' where contains textField, button, textArea and so on.... the code like this: [CODE] p2.add(c=new Label("Type name to search:")); p2.add(m=new TextField(10)); p2.add(b=new Button ("SEARCH")); b.addActionListener(this); p.add(k= new Label("CLICK SEARCH TO START ACTION") p1.add(t=new TextArea(""), BorderLayout.CENTER); [/CODE] i have another class file named 'searchCompare' where user … | |
Hai, I'm trying to load an image using applet.but i didn't get the image. The applet screen was an empty,it shows at the status bar "Start: Applet not initialized" . I don't know how to get a image.pls somebody help me.the codes following ------------------------------------------------------------------------------------ /*<applet code="crim1.class" height=500 width=500> <param name="img" … | |
Hello, in my webbrowser object, the web page it loads has a java applet in it, when it loads all that appears is a grey box? I have java 1.5 Is there something im doing wrong? | |
hi everyone.... im doing IDE for java swing (like dragging comp into design area)... is there a way to save the design as format and when i open it the design must be showed as it was saved.... Thanks in advance... | |
Hi. I'm trying to develop a currency converter, using live currency exchange rates. I've already designed multiple interfaces and a lot of codes for it, but i just do not seem to be getting this right. I need your assistance, guys. I'm a new member, who just joined the community … |
The End.