32,199 Topics
| |
Hi all Is it possible to use only the classes you need in a panel or something? I'm finding it hard to explain my question, i'll give an example: We need to make a program to organise swimming competitions. When you want to (as a user) edit or create a … | |
Working on a current project with these parameters and am not sure where to start. I am new to all of this and could use some input. Use JAVA to build a sales commission application. In this application, the user enters a number in the SALES JoptionPane textbox. When the … | |
I'm working on a code to calculate a final score. Here below is my code: [code] public void calcFinalOCAS() { int calcFinalOCAS; int sum = 0; List<Integer> tmaMarks = new ArrayList<Integer>(); Collections.sort(tmaMarks); int minMarks = Collections.min(tmaMarks); if(minMarks < substitutionScore) { minMarks = substitutionScore; } for (int i = 0; i … | |
hi..i was wondering where to find a sample java code that splits an image and each image that was splitted can be click and link to another image... | |
I have a list of teams, it can be any length. Now, for each team, I want to create a 2D box that says the team's name in the box. And I want to match these teams up against each other. So basically I want to be able to drag … | |
Hi, How can I code it so I can make a new window appear on my application? Let's say, user hits a "new user" button, a new window is supposed to pop with TextFields and labels and so on. In Dephi is something like, Form1.show; How do I do this … | |
[CODE]public static RSString method50(byte i, int i_0_) { if (i > -36) anInt63 = -44; anInt55++; if (i_0_ < 100000) return (Class68_Sub20_Sub13_Sub2.method1166 (2, new RSString[] { Class85.aRSString_1556, Class68_Sub13_Sub24.method816(i_0_, 0), Class96.aRSString_1697 })); if (i_0_ < 10000000) return (Class68_Sub20_Sub13_Sub2.method1166 (2, (new RSString[] { Class21_Sub1.aRSString_2695, Class68_Sub13_Sub24.method816(i_0_ / 1000, 0), Class68_Sub13_Sub11.aRSString_3611, Class96.aRSString_1697 }))); return … | |
Hello, I am doing an upload of my applet has my website, I works very well but I do not like putting a bar of Progress! (JPROGRESSBAR)! CAN PLEASE HELP ME! UPLOAD MY CODE! String targetURL = "http://localhost/swfupload/demos/swfobjectdemo/upload. aspx"; PostMethod filePost = new PostMethod(targetURL); filePost.getParams().setBooleanParameter(HttpMethodParams.US E_EXPECT_CONTINUE,true); try { File targetFile … | |
I'm writing a program that determines the population of the world between years 1975 to 2006. I found an equation for the world pop and i put it in my code, but i keep getting a '.class' expected. Can anyone help??? --Cassie P.S: The error is where pop is defined. … | |
Can anyone help me for the Scjp dums? i need them jus to see the type of qus that are asked in the exam. | |
Im sorry earlier i didnt know the rules but i know them now. Ive been trying all day and this is the farthest i could get... [code=java] /** * Program designed to keep the inventory of books in a bookstore. * * @author * @version 1.0 Dveloped on May 3, … | |
I created a class that takes a 3 dimensional array and puts it in a txt file, the method is called output(). I can't figure out where to call the method though. I'm trying to have it so it is called when numb=4 in the actionListener on the bottom. Please … | |
Hi everyone, I'm working on an app that saves data on a text file, as we know, formatting text file is awful and not very user friendly. I'd like to save the information I've collected on my program on a nicely formatted excel file. Given the file it's already created, … | |
I am trying to copy large files over a network using sockets and channels. Here is a code snippet //sender side FileInputStream in = new FileInputStream(inputFileName); FileChannel fromFile = in.getChannel(); SocketChannel toSocket = sendSocket.getChannel(); fromFile.transferTo(0, 999999, toSocket ); However, in the line where I call transferTo I get NullPointerException. Any … | |
Hi all, I have a frame, which has several tabs. I would like to perform some actions, when user clicks on a tab. Can someone please tell me what's the event that I should look into? Thanks in advance. | |
[code="java"] import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.*; public class SketchPad { public static void main(String[] args) { SketchPad sketchpad = new SketchPad(); sketchpad.gui(); } public void gui() { JFrame mainF = new JFrame(); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("file"); mainF.setJMenuBar(menuBar); … | |
i think theres something wrong with my computer, im trying to create a GUI for my program but it wont display my JLabels (which contain images) i downloaded a program with a GUI i made at the computer lab in my university which works there, but on my laptop it … | |
My input file has 84 integers and I'm not sure what I'm doing wrong. PLEASE HELP! import java.util.*; import javax.swing.*; import java.awt.*; import java.util.Scanner; import java.io.*; public class Museum { private int Week=3; private int Hour=4; private int Day=7; int[][][] visitors = new int[Week][Day][Hour]; private int[] allWeeks; private int[] allHours; … | |
I need this by tonight if anyone could help out id appreciate it because im completely lost. Thanks. Write a project to keep the inventory of books in a book store. Create a book class with the following variables and methods Title Price Pages getTitle() setTitle() setPrice() getPrice() setPages() getPages() … | |
if (iStream.close() I am stuck on how to use iStream to print [code] import java.io.*; import java.util.*; public class BucketSort { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // This is a scanner for the keyboard System.out.print("Enter a filename: "); String fname=sc.nextLine(); // This is the … | |
I need to do paint a graphics into a nested panel. I am able to paint in a frame but when I add the class for painting into another JPanel, I see nothing. I know how to create nested panels but when I do it with a panel containing my … | |
i want to make a quiz game in java so tht the question come randomly and the answer get validated whn the user select the option...plz help me.... | |
I am having some trouble with an assignment I have. Is there anyone out there that can help me? I have been struggling with the class all semester and my professor isn't much help. This is the assignment, I already have data file: Instead of storing the diver data in … | |
Hey people... My problem is: - - Heaviest Word Find the the heaviest word in an array. One word is heavier than the other if it has more vocals than the other. Vocal characters are ('a', 'e', 'i', 'o', 'u', 'y') If two words have the same number of vocals, … | |
Design a class called BubbleSort that is similar to the class SelectionSort. The class BubbleSort will be used in the same way as the class SelectionSort, but it will use the bubble sort algorithm, which is [CODE=syntax] for(int i = 0; i < a.length-1; i++) if(a[i]>a[i+1]) interchange the values of … | |
I have a few minor problems with this program: 1. My selectionSort method - it sorted Z - A, not A - Z. 2. Since I used a string array, I'm running into problems with "operator > cannot be applied" and "incompatible types". 3. Return "search term not found" in … | |
i have an array which fills with objects in my code after i press a certain button in my GUI I have another button which when i press should remove all of these objects from the array. however i cannot find a way to do this. can anyone help me … | |
Hey all! I use the folowing class in my program to draw lines. However I also need to be able to delete them. So I need to add a mouselistener to the lines but I don't know how and whereto do this.. Can anybody help me with this? Thanks!! [code] … | |
I am reading a .Csv file and am having problems trying to get the information I want, set up the way I want. Here is where my problem comes in: [code] String[] info = beanInfo.split("," , 3); for (String str : info) { ip = info[0]; hostname = info[1]; ping … | |
I cant get the program to drawy the triangle properly. Can some help me with the draw the polgygon triangle? [CODE]/* Alex Bruso (student 2) + Tim Mumford (student 1) Hw Shape Group Exercise This program will create an applet which will draw shapes. The input from the user will … |
The End.