36,051 Topics
![]() | |
Hi actually we r building a project based on mobiles so can any1 suggest me one efficient mobile simulator built on java.. | |
I complete this script, but it seem a bit messy at the If else if statement. Can someone make it look nicer, or point out any other place I need to fix to make this better. Thank you [CODE] import java.io.*; public class Assignment4 { public static void main(String[]args) throws … | |
Hi; I have a problem which involves the road map of a certain country is given and I have to find the best solution to find a best solution for the map by demolishing the extra roads in the map and keep the roads that would make it possible for … | |
Hey there, I have the following code: [CODE]public void paintComponent(Graphics d){ int gjeresia_e_kornizes = 800; int lartesia_e_kornizes = 800; d.setColor(Color.white); d.fillRect(0, 0, gjeresia_e_kornizes, lartesia_e_kornizes); d.setColor(Color.red); d.fillOval(105, 70, 250, 350); try { Thread.sleep(2000); } catch (InterruptedException e) { } d.setColor(Color.blue); d.fillOval(150, 170, 50, 20); d.fillOval(270, 170, 50, 20); try { Thread.sleep(2000); … | |
I am using the robot class to move the cursor across the screen. Is it possible for my java program to detect a change in cursor shape or color as the cursor moves across an open window where the non-java program controlling that window is the source of the change … | |
Dear Friends, I have created a file upload utility which will read the .csv files. My database structure is-- 1)id 2)mobile_no 3)address The administrator will do bulk upload for the above. If the id and mobile_no are already present in the database...then it will update the existing data. If doesnot … | |
Hi all, I have a problem concerning my project which is Persoanlised Agent for hotels. In fact, i am creating an interface using java swing for entering the details so as to be able to search for available hotels in a specific country.. the different search criteria is 1) Price … | |
[code]import java.util.Map.Entry; import java.util.Properties; import java.util.Set; public class Sysdetail { public static void main(String args[]) { Properties systemProps = System.getProperties(); Set<Entry<Object, Object>> sets = systemProps.entrySet(); System.out.println("systems properties:"); for(Entry<Object,Object> entry : sets) { System.out.println("name: " + entry.getKey() + ", value: " + entry.getValue()); } } }[/code] | |
Sorry for the somewhat sloppy programming but it should be understandable. Ok i'm supposed to write a function decide(), its purpose is to first broadcast a User object and then listening for any acknowledgements. If any was received it acts like a client and the one who sent the response … | |
Hello All, Can anybody plz guide me how to write a new method in servlet. I am using netbeans 6.8 A code snippet will be highly appreciated. Also I will be calling these method of servlet B from servlet A. In Servlet A there are 2 hyper links, which should … | |
I'm suppose to combine class Time2 and class date into one class DateAndTime. I don't understand how to do it at all, I've been trying to read through my book and I just don't get it. Can anyone possibly help me out on how i could combine these two classes? … | |
plsss teach me how insert a image in jcreator........... | |
guys, good morning...what are the requirements that must be installed for you to call java class using PHP?? thanks for the reply ^_^ | |
Hi guys, my lecturer has mentioned overriding the equals method before. Am I correct in saying that you override the equals method so that instead of checking if two objects have the same reference it checks their values? And therefore is it also right that there is only one code … | |
I wonder if it okay to write a big equation in System.out like this or Seperate [CODE]else if (earn>=200 && earn<=693) { System.out.println("Excess Earning" + (earn-200)); excess = (8.40+((earn-200)*.15)); System.out.println("Tax Withholding" + excess); }[/CODE] | |
I am working on some assignment. I read the book, and did exactly as it said, but it came up some weird error I don't know how to fix. Please edit my problem, so I can continue my work. Thank you. [CODE]import java.io.*; public class Assignment4 { public static void … | |
hello please help me i have a program and i want to connect to the database i don't have any idea on how to connect because im still a begginer on this..help me please how to connect to the database,hoping for your positive responds | |
Hi, Im suppose to write a Maximum consecutive sorted substring in a string. "abacdefkabfh" is acdefk. Im suppose to analyze the time omplexity of an algorithm.. I dont know where to begin | |
i want to add condition if >100 is error but when im try to add the condition the program is running but not what i want... can somebody tell me what should i do..tq import java.util.*; public class test_scores { public static void main(String args[]) { Scanner input = new … | |
Hello everyone! I'm currently making my own implementation of java.util.List, and it's going pretty well. I've just run into a minor problem. I'm currently doing the 'addAll(int index, Collection<?> c);' method. But I can't seem to figure out how to make it start at the specified index.. this is the … | |
Hi I would like to know what operator to use for a number in between my input. Is it something like this? If I input the number between 116 and 200. [CODE]else if (Earn>=116)&&(Earn <=200)[/CODE] | |
hi there i wanted to know if there is something like global or extern variables (in,c language),which i can use in every class ?! and my other question is ,if is there a complete tutorial on netbeans gui builder , because i have lots of problems about jframes. thanks a … | |
hello please help me i have picture then i want to put on my JButton but the problem is that my picture is too big its jpg file how to make this bmp file so that it fit to my Jbutton..hoping for your positive responds | |
Hi, I have a pixel array grabbed with [I]PixelGrabber[/I]. I done some computation with it and now I need make a BufferedImage from it. The problem is I can't make it very fast, just slow. I made an Image type object from it then I converted it to a BufferedImages … | |
Hi I am a novice working with Java and the eclipse IDE. What I want to read words from a text file, store it as a list converting it to some uniform case. Then I input some word/sentence from keyboard and check whether it is present in the file. Well … | |
[B]Input file[/B] --> input.txt (contains the lines below) --------------------------------------------- 1. Something something 2. Something something 3. Something something 4. Something something 5. Something something --------------------------------------------- [B]Requirement:[/B] Read the text file line by line and compare a character in the current line with all the lines below it. For example if … | |
Hi all, I have extended JButton to myButton this is my constructor [CODE]myButton(String text,char key){ this(text); this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(key)),"Action"); this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toLowerCase(key)),"Action"); this.getActionMap().put("Action",action); this.setMnemonic((int) Character.toUpperCase(key)); }[/CODE] I m using single key shortcut for the myButton and i am using setToolTipText(String) But when i hover it shows me like this "Move Tool Unknown KeyCode: 0x0" … | |
I'm writing objects in a link list to file and when I write more thatn a certain number I get a StackOverflowError. My list has Item objects which have long part numbers, two doubles, a string, and an int. here's the code that is failing; [CODE] try { FileOutputStream fos … | |
Hi i am very new to java and have come across this problem in my code. Will someone please explain to me why i am getting a null point exception and what one is? I have tried to find out what it means but i cannot find an explanation anywhere. … | |
hi, I am trying to build a small program that can search java ‘class’ files and ‘method’s from a repository where millions of java files are stored. In addition it has an algorithm(LONGEST COMMON SUBSEQUENCE) to compare the results to find the similarity percentage and user can make precision by … | |
Recently , i just used jcreator with apache ant 1.7.1 for jsp development. I have a issue that I always performed "remove", "dist", "install" to update and deploy my latest web project. Is there any easier way to reload entire web project without always click on these three. It takes … | |
[B]Hi, Please could someone help with the following, I am a beginner at Java :) Thanks[/B] There is a rhyme (a bit like 'Ten Green Bottles' ) called 'Bottles of Beer' which runs thus: 4 bottles of beer on the wall, 4 bottles of beer, Take one down, pass it … | |
I'm given a project to develop program to search text files in a folder to find matches for a given text and list the containing files. I can't use Java built-in data structures. I have to use my own data structures with algorithms. I thought of building a data-structure similar … | |
Hi, I wrote a python program that counts the occurance of each alphabetic character in a string and it works fine. I tried to port it over to java but now it fails, telling me that there is no alphabetic characters at all in it. [CODE]for (int i=0;i<alphabet.length;i++) { for … | |
how to create a submenu in Swing. I am using Netbeans IDE 6.8. Please help me. thanks in advance | |
Following examples and threads of previous inquiries I find myself asking two primary things 1. Why when I place the following code - [CODE]Break;//break the string[/CODE] at the end of my while statement that reads [CODE]while(!name.toLowerCase().equals("stop")); //begin while control statement end = true; //end if condition is true, counter initiated … | |
I have a class, Cast(as in cast of a play), that implements the Collection<Actor> interface(Actor is a class representing an entity in a game) and I have the following code. [code=java] Set<Actor> toRemove = new HashSet(locations.keySet()); //method 1 toRemove.removeAll(actors); //method 2 for(Actor actor : actors){ toRemove.remove(actor); } [/code] if I … | |
I have an assignment where I am supposed to get a user input file with data in it, like below: [QUOTE]Billy Bob 98.6 98.6 98.6 100 200 300 400 500 600 700 800 900 110 220 330 440 550 660 770 880 990 111 222 333 444 555 666 777 … | |
I would like some help with this program that I wrote for my class project. I have a class Point, class Circle and a main test program. I'm having difficulty with where to put some if else statements to find the quadrant that the points x,y are located. I wrote … | |
Hi, How to edit the following xml file without losing elements. eg: [code=xml] <book id="b1"> <bookbegin id="bb1"> <para id="p1">This is<b>first</b>line</para> <para id="p2">This is<b>second</b>line</para> <para id="p3">This is<b>third</b>line</para> </bookbegin> </book>[/code] I try to edit the above xml file using dtd using jsp,servlet. but while i read the textvalue from xml, it return … | |
If in big problem, I want a to add the ResultSet of MySQL in JTable.Table should in Panel. and There should be autosizing of the result. | |
i am making a media player to play all types of media player using jmf technology. can anyone help me to figureout how jmf can play all files () | |
i want the output detect the error because the condition is -20-20, 1st key in is ok but the second time no matter what number i have key in it will accept even i key in out of condition. please help me... import java.util.Scanner; import java.text.DecimalFormat; public class CPI { … | |
Hello guys I normally write java...but heres my question [CODE] int propId = Integer.parseInt(request.getParameter("property")); <script type="text/javascript"> function doReport1() { document.forms[0].target = "_blank"; document.forms[0].action = 'http://<%=accountName%>/JAABA/jsp/cpanel/homeSellerReport1.jsp?propId=<%=propId%>'; document.forms[0].submit(); } <div class="marginTopBump5 marginBottomBump9"> <div class="left paddingRight2 paddingTop21">Dear</div> <input type="text" name="custName" maxlength="100" size="40" value="" class="fullBox left" /> <div class="left"> ,</div> [/CODE] as you can see … | |
hay there hope you will all be fine I an idea about the product for that i need a software but i dont know that in which software it will be made my idea about the product is that "I want to make a product in which all the information … | |
Why must the use of the this keyword, or similarly the use of the super keyword in constructor chaining, be on the first line of an overloaded constructor? In other words, actual class construction cannot be split between constructors. If re-direction must occur, it must be the first line of … | |
Hi, I am new to Java, but have been programming in C++ for a few years now. I am working on a project where I have to write a class to implement a gameboard. To do so, I'm using a 2D array of objects. I have a method that swaps … | |
I'm trying to compare strings in a Linked List and it throws a null pointer exception somewhere in the method smallest() which is where i have the strings(nodes) comparing each other. I've been Trying to find the answer for two days now and I've gotten nowhere. PLEASE HELP! The code … | |
Hi, I am doing a final year project which is about predicting a situation based on given known facts, as a extra feature to my project I would like add a word cloud system to it aswell that would display the predictions in word cloud form to indicate the likelyhood. … | |
I plan to make Java image viewer I just started today and I had hard time with GridBagSizer After long time of pain it turned to be fruitful. Here is what I have so far. I want the following, of which I have failed: 1. Make the components fill the … |
The End.