32,199 Topics
| |
Hi, I am trying to make thumbnail viewer and having problem putting the thumbnail in the proper place. All I am trying to do is this: [CODE] iconPanel.add(iconBar, BorderLayout.NORTH); for (int x = 0; x < 4; x++) { iconBar.add(emptyThumbnail,BorderLayout.CENTER); repaint(); validate(); } [/CODE] Ant then whenever I scroll, [CODE]for … | |
hii the following is my xml file.. [CODE][/CODE] <?xml version="1.0" encoding="UTF-8" ?> - <categories> - <medicines> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114126\2.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114126\3_001.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114126\3.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114126\4.html</url> </medicines> - <treatment> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114723\anemia-treatment-with-home-remedies.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421114723\ayurveda-encyclopedia-w.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421141322\alternative-treatments.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421141322\aromatherapy.html</url> <url>C:\Users\pcnet\Desktop\ayurveda_pages\20100421141322\free-home-remedy.html</url> </treatment> </categories> i want someone to help me to tell how to add a new url to the already existing xml file...new … | |
I'm writing a program that reads information from three seperate classes. Here is my code: [CODE] public class Animal { protected int id; protected String type; protected double mass; //------------------------------------------------------------------------ // Sets up an animal with the specified ID number, type and weight. //------------------------------------------------------------------------ public Animal (int animalID, String animalType, … | |
Hi, I made a java application to distribute on Mac osx. I created folder .app structure according to mac application. The application is being successfully launched by double click on Myapplication.app on Mac Osx which contains Java5. Its not launching the application on Mac with Java6. I searched for the … | |
I have this program where I need to get the suggested next move (a column index) and also call the 'go' method using this column as the parameter. This is what I have come up with so far. [B]Connect4Model[/B] [CODE]public class Connect4Model { Connect4Column [] columns; // an array of … | |
Hi I'm currently doing a connect 4 program and I need to write an apporpiate get and set methods so that the other classes can access this information. ('State of the autoplay' is simply whether red or yellow (or no-one) is set to have the computer make their move). I've … | |
Hi guys revising for an exam and im fine with the theory stuff but heres one question: A large ornamental garden is open to the members of the public who can enter through two gates: east gate or the west gate. The management wants to determine how many people there … | |
| So in class we are making a program and we have a big problem with what is pretty much the last method we need. We want a download function, which basically takes a file already specified and copies it to the destination (and name) chosen by the user. WE have … |
hi i had created a Jtable Which Stores Data like below -------------------------------------------------------- a b c d e w q 1 2 9 -------------------------------------------------------- i want to get the cell value when i click to the cell... i tried lot but not got hte out put please help to get the … | |
I am not really familiar with the whole [B]SEO[/B] process but I recently hired someone at <snip> to do the whole process for me. The person there made me know that it is not smart to include a lot of my content in my [B]Javascript[/B] files as they are not … | |
hello, i am using preparestatement to insert muliple rows into database. [CODE]String query = "insert into table_temp(col1,col2) values(?,?)"; pstmt = con.prepareStatement(query); pstmt.setString(1,"a"); pstmt.setInt(2,100); pstmt.addBatch(); pstmt.setString(1,"b"); pstmt.setInt(2,null); pstmt.addBatch(); int[] cnt = pstmt.executeBatch(); [/CODE] My problem is that in the 2nd addBatch block i dont want to insert any value into the … | |
I'm writing a code segment that calculates and displays the number of holes upon which a golfer made an eagle. Which is two fewer than the par value for the hole. This is what I have come up with. [CODE] int[] par = new int[18]; int[] strokes = new int[18]; … | |
Hello, I'm trying to read from the command line. There are 9 numbers and I want to store them in an array as int. I've alread the following [CODE] public static void main(String[] args) throws IOException{ String [] temp; public static void main(String[] args) throws IOException { InputStreamReader inputStream = … | |
hi everyone. well I have a small problem. Actually, I have an interface (ComplexNum) and a class (ComplexNumb).The end result is to do small calculation with some complex numbers. I have already implemented the interface in the class , but eclipse keeps on telling me that I have to implement … | |
Hi, When I tried to install Netbeans 6.1 in Vista, I get this error message: java.lang.RuntimeException: java.io.IOException: Could not get shell folder ID list Any help would be appreciated. Regards, Anthony | |
I have a gui with an ADD, EDIT, and DELETE button. All of which are not active until you click their respective name from the menu bar. Once I click on the DELETE key in the menu, it actives my delete button fine, but when I select an object from … | |
hi please help to print character form a-z and 0-9 randamly in java all the character sholud be present without repetion ie all 26+10 letter sholud print and each time it sholud print differently like First time if it print like this 0 a 2 f g t h y … | |
My Printwriter method is not writing to a text file. the code runs fine it displays the text on screen but nothing appears in the text file. [CODE] public void run() throws IOException { Scanner sc = new Scanner(System.in); boolean cont = true; while (cont) { System.out.println("Enter your line text"); … | |
Hello, I am pretty new to Java so I am following along in a book to learn it. I am currently in the beginnings of making a MIDI player but I have run into to a problem. I am using a sequencer, if I don't close the sequencer the program … | |
I had to convert one of my programs into an applet. And most of it I copied and pasted, but the program is suppose to let the user input a number in the texfield and when they click one of the radio button options the calculate resuls are suppose to … | |
Hi, I am trying to create a graphical program that visually stimulates the path of the sun over a city skyline. I've created a Time button but I don't know how to move my sun to the right each time I click on "Time". The program should works like this: … | |
So my teacher this semester is the worst I ever had, I can not get a hold of him at all for help on these labs I've been working on them and trying to get his help on them for the past 3 weeks but since it's an online class, … | |
I'm trying to make a method that would create a new tab with a specified name and a white background. However, nothing I pass in (whether it's a JPanel, JButton, etc.) would show up in the final result. I can't tell what's wrong. [CODE]import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.BorderLayout; import … | |
Salon membership fee Male = 600 Female = 500 If Foreigner +850 n for not foreign f if foreign my code is [CODE] public static void main(String[] args) { String gender, nat; gender=JOptionPane.showInputDialog("Gender"); nat=JOptionPane.showInputDialog("Nationality"); if (gender=="m" & nat=="n"){ JOptionPane.showMessageDialog(null,"Gender:" +gender +"\nNationality"+nat+"Fee is 1450" [/CODE] This code doesn't work so I … | |
Okay, so I wrote a method that goes through the arraylist checks if the items has the maximum value, which is ten, and returns it in a new arraylist. I got that method to work, but I am having trouble writing the test class for it. It keeps returning false. … | |
i want to add a button in my java program so that when i click that button pages of router\modem connected to computer is open please suggest solution | |
Hello Could someone point out what I need to change in the code I have so far? I would like to use XML format in a properties file. The original .properties worked but this will not load the new formatted .properties. I have an app that loads properties in ModelUtils.java … | |
Write a program which takes a single integer input "height" and displays a "pyramid" of this height made up of "*" characters on the screen. Sample Output: Pick another height (must be between 1 and 30): the triangle must be equilataural * *** ***** ******* ********* *********** ************* | |
Ok so I have been working on this for 12 hours straight and I cannot get it to work right to save my life. Attached is the word document of what the project is suppose to do and the file its suppose to read from. [B]ANY HELP IS GREATLY APPRECIATED … | |
hey guys ok so i'm stuck with a logic error this program im writing requites me to we write my own hash table when pulling a pice it seems to add an extra index some how there fore it really shows up with dates in December. thanks for any help. … |
The End.