35,618 Topics
![]() | |
How can I limit the length of a text field.. I want allow entering specific number of characters in the text field?? Is there a constructor... I couldn't find 1.. plz help... | |
Hi there, I'm attempting to write a program that does the target word puzzles you see in most major newspapers. The target word problem involves a 3x3 grid of 9 random letters that a user needs to be able to make words out of using at least the middle letter … | |
Hi guys, Just wondering if someone could help point out why the string value s1 in the for loop cannot be passed on to String input.... here is my code. Please ignore the commented out parts. Cheers for any help [CODE]import java.io.*; import java.util.*; import java.lang.*; public class gaelan3 { … | |
Ok, well I am JUST beginning to learn Java, and I have run into a little stumbling block. I am attempting to write a little applet, but it doesn't seem to want to run. My Java code: [code=java] import java.awt.*; import java.applet.*; public class TestApplet extends Applet { public void … | |
I've run into a few problems with this one. I've tried my best following the directions. I can't figure out how to properly use "switch" since we haven't really put it to use in class. I want to create random integers (this I know how to do) that will become … | |
Hi Guys, I have a compiled java file example.class and i need to use the methods in this file to read from a text file. I need to have this file inside my package as requested by the teacher. However when i put the example.class file into my package and … | |
Hi I am trying to create a method that will substitute a value x with a value y in a basic array. Your assistance is much appreciated! Yeungn | |
Need to take input from a file as command line argument and put it in an array, but i keep getting .class expected on this line [CODE]temp[][] = infile.nextInt();[/CODE] Here is the whole code so far for reference [CODE]import java.util.*; class Temps { public static void main(String[] args) { Scanner … | |
I have created a JApplet and I want to be able to clear the screen and draw new components depending on what button I click on. Right now the code below will clear the screen but it doesn't redraw the JTextFields (label_1 & label_2). However I did notice whenever I … | |
Working on a project that is basically a simple bowling program that uses a gui to read in from a given text file a pre-determined amount of names and scores...runs through the standard 10 frame scoring system, prints out the score, and who won. Now I can't seem to get … | |
Ok so im building a level editor for this game. What the code i cant working does is, when the button is clicked it should get the selected cell from the jtable and set a value for it. However, for some reason I cannont get it working. Here is the … | |
[CODE]public String expandTemplateTopic(String remark) { String random_word = findKeyWord(remark); String str=" "; String kok2=" "; int num1=0; int num2=0; int num3=0; //find a random template int number = generator.nextInt(sentenceList.size()); String argument=sentenceList.get(number).getTemplate(); //split it into words using space as delimiter List ls=new LinkedList(); String[] array =argument.split (" "); //find if there … | |
hello friends, I am doing my project on above topic and I am trying it with Java. Is it possible doing it in Java. What Techniques I'm using are: 1.Java(JMF) 2.Oracle 9i(Inter-Media) 3.Matlab This project concludes of four parts 1.Segmentation (Video to Image conversion) 2.Comparison (Copare frame using algo.) 3.Extraction … | |
I'm having Java course and I have to submit the following programs by the coming Wednesday for what I am not skilled enough till now. Please may you code those for me for this time? PART 1 P1. Write a java program to calculate the roots of a quadratic equation … | |
Hi there, I'm new to webapp creation and want to try making one using eclipse, maven and spring. The tutorials I find on the net use the maven-archetype-webapp to start their creation, but for some reason that doesn't work on my eclipse... When I fire it up its settings start … | |
Default spring problem i want to create database table automatically using spring ,what can i do? | |
I want to help me to Write a program which will draw an “X” shape as shown in the figure below. Your program must consist of one class named “Picture”. In your main method you must declare and initialize some String variables which you will later use in a print … | |
I'm having problems with java not correctly waiting for a method to finish before continueing. I have a sound file that lasts an unknown amount of time and I want to set lengthS to that time, I do this by taking the System's current time in milliseconds before and after … | |
Hi...i am supposed to implement min heap,deap,leftist tree using linked list in java..i can nly get the codes which are implemented using arrays..plz direct me by giving the site address r if anyone has the codes send it... thanks in advance | |
[COLOR="Green"][B]I want to help me please to write aprogram that computers whetger a given input for the lenghths of three sides of a triangle forming a right triangle or not.... and i'm attach the file >>>> please help me >>>>> i wat to intreduce this assignment tomorow......[/[/B]COLOR] | |
Hello all, I have an app that I'm building, slowly as I learn, and I'm having some issues with the JDialog implementation. I'm using NetBeans which generates pretty much everything except for the gutsy bits of code needed... (i.e. code for button actions, etc) I have my main application which … | |
I'm trying to create an applet that records your voice to a file, then plays that file back to you. I have already managed to complete the second parts (using AudioClip) but I have no idea how I can record sound in an applet. Could anyone give me some advice? | |
I am using this code for displaying images on JPanel, in which i succeeded, but the images are volatile. When i maximize or minimize the frame, it vanishes. [code] public class ImagePanel extends JPanel{ private BufferedImage image; public ImagePanel() { try { image = ImageIO.read(new File("image name and path")); } … | |
Hello everyone, I am new to JSP. Can any one help me how to implement "search" button in jsp, what i need is that i need one text box where i will write the name of the person whose details i need to search, then on clicking the search button … | |
Hey everyone. I am supposed to create a program that will input the miles driven and gallons used for each tank full of gas. program has to calculate and display the miler per gallon obtained for each tankful and print the combined miles per gallon for all tank fulls up … | |
I am creating a GUI program with java and when I run it, I get this stack of errors. [CODE] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at ButtonPanel$AllocateListener.actionPerformed(ButtonPanel.java:52) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at … | |
The problem I'm having is that I have a min heap class that is created with java generics. In the class where I use the min heap class(call it sorter) I have a float array, which is full of primitive float values. The constructor for the min-heap class takes a … | |
java float example float f1 = 5.5f; float f2 = 5.4f; how would you initialize a static float without using the wrapper class? static float f1 = 5.5f would that be correct? | |
I am no good with programming. I am only taking it because I have to. I am majoring in Business Information Technology with Computer Network Admin. I have yet to figure out why I have to take programming if I am not going to really need it. Anyhow, I am … | |
Here i draw chessBoard and adjust affect of appearin blue rect when player press by mouse on the above two rows but the pawn image not appear . I made [B]intializingIcoss()[/B] on class[B] BoardGame[/B] then the method appear but when the image not appear when i put the method on … |
The End.