32,199 Topics
| |
I want to increase column width automatically when record is added or record fetched from database in jtable in java. | |
I've never felt like a total moron until I took a Computer Science class. I'm trying to create a program that rolls a pair of standard 6 sided dice 10,000 times and outputs how many times doubles show up, using a "while" loop. I think what I'm trying to do … | |
I have no idea what wrong my cods when I press = button of my calculator nothing happens. [CODE]import java.util.Stack; import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; import java.util.Vector; public class Ahsan extends JFrame{ Stack s = new Stack(); private JFrame f; private JPanel p1,p2; private JTextField … | |
Hi, I'm having trouble with setting up my table. How do i get the header to show initially. I want "code", "Number" and "Value" as the header. And I want to know if the way i added the table is correct? Can you help me please. Thank you! [CODE] import … | |
Hi, I'm learning java and I have a problem. The getText() doesn't seem to work. What I am trying to do is to write a simple code, where I assign the text of a button to a string variable and print that string variable on the command line. I get … | |
Hi all, I'm working on a maze project with different types of robots. One of the robots is supposed to be a right-hand-rule robot which follows his right hand. The way I'm coding it so far, is I have an Enum Orientation. If the right hand is facing UP, DOWN, … | |
hi i have made a program to find average and standard deviation. n it read input from other. rest of things are fine plz guide me my output for Standard deiation sD comes NaN. i have searched alot bt couldnot find solution my code is [CODE]import java.io.*; import java.util.*; public … | |
how can i scan a character from scannner class( just like int-nextInt,Boolean-nextBoolean) | |
hi , i am new to programming in java , i developed a program in java , my program is take two input files , first file has one sequence and second file has multiple sequences and then compute the edit distance between these two files . my problem is … | |
I got the Jasypt 1.8 and i have jasypt-1.8 folder but how can i add this new libraries to my project org.jasypt doesnt appear so what i need to do? | |
alright well i have already posted in the python forum part, now this question is the same one as the one i did for college level computer science but this is for university. any way im pretty sure i have it but before when it was working it would say … | |
Hi all! The past couple times I posted they were all about 2D arrays.. and here I am again with them =( I cannot escape them! Anyway, the project I'm working on requires a Maze class that holds a 2D array and different types of robots that will find their … | |
[CODE] //Creating a variable for the connection called //"con" Connection con = DriverManager.getConnection("jdbc:mysql://IP_ADDRESS:3306/DATABASE_NAME", "USERNAME", "PASSWORD"); ... [/CODE] If I don't want at least the username and password to be shown in clear text... is there something I can do? Have them in a file thats encrypted or... I don't know.. … | |
I am implementing Selection sort in doubly - linked list. I have to sort list by surnames by finding smallest element and inserting it into beginning of the list But there are some troubles when I run my program I have NIL exception in Sort Method in while loop. Help … | |
import java.util.*; import static java.lang.System.*; public class tester { public static void main(String args[]) { Scanner kbReader = new Scanner (in); System.out.print("Enter your integer here."); //enter 3001 int i = kbReader.nextInt( ); int count =0; for(int i = 100; i <= 999; i++) { int factors = 0 ; for … | |
So the localization file I am getting is an xliff file. I am trying to find a tutorial or a starter to help me call in a key and return its value. I have seen some tools but not what I am looking for. Any help will be appreciated. Thanks. | |
Hi, I am php developer and I would like to embed a expert system in my site. I have made a form in my site and when I click Ok I would like to run a .clp file via Jess (Java Expert System Shell) But I don't know how ... … | |
how to play from bytes (like sound) but without filename.... I read from InputStream by bytes, it must play... It is like sound streaming... | |
I'd like to add (using the mathematical term) two Integer ArrayLists in Java, as well as divide them and multiply. How would I go about this algorithmically? I can't for the life of me think of something, perhaps having to do with two's complements. Okay, so let's say that I … | |
I need to access a file that isn't relative to the directory that the .jar file is in. I got lucky with another part of the program doing this, but I really don't know how. Thanks, Jack | |
Hello all, I'm trying to read an ant script through java and find where all its .java files and libraries are located. I've gone through the Apache ant API but couldn't find an appropriate method. So far all I could come up was the below code, it gives the properties … | |
Already answered, code removed for privacy reasons. Thanks! | |
I'm 'spose to be making a screen saver-ish program where objects bounce off the walls, but I'm stuck getting multiple objects to show up on the screen at once. This is my object to make a square: [CODE]package movingshape; import java.awt.Graphics; import javax.swing.JPanel; import java.awt.*; import java.util.Random; public class Shapes … | |
I am developing an application in which I have two JPanels (aPanel and bPanel) added to a parent JPanel (cPanel). I need to be able to double click on either aPanel or bPanel to change its color. If I double click on aPanel, it changes color as desired. When I … | |
Hello! 1)Is it possible to understand which [B]minimum[/B] Java version need (support) my code to run properly? 2)I use JFrame but that does not changes my icon on window? [CODE] Image logo = Toolkit.getDefaultToolkit().getImage("logo.png"); setIconImage(logo); [/CODE] 3)Also that code throws an Exception [CODE] Class<?> awtUtilitiesClass = Class.forName("com.sun.awt.AWTUtilities"); Method mSetWindowOpacity = … | |
[CODE]package lottery; import java.util.*; import java.util.ArrayList; public class Lottery { public static final int REGULAR_NUMBERS = 7; public static final int EXTRA_NUMBERS = 3; public static final int MAX_NUMBER = 39; public static final int TOTAL_PRIZE = 50; public static double winning; public static double cost; public static int round; … | |
Grade2 Class.... [CODE]public class Grade2 { public Grade2(double input) { Grade = input; } public String getLetterGrade() { if(Grade==(4.0)) message="A+"; else if(Grade>=(3.85)&&Grade<=(3.99)) message="A"; else if(Grade>=(3.7)&&Grade<=(3.8499999)) message="A-"; else if(Grade>=(3.01)&&Grade<=(3.3)) message="B+"; else if(Grade>=(2.85)&&Grade<=(3.00)) message="B"; else if(Grade>=(2.7)&&Grade<=(2.8499)) message="B-"; else if(Grade>=(2.01)&&Grade<=(2.3)) message="C+"; else if(Grade>=(1.85)&&Grade<=(2.00)) message="C"; else if(Grade>=(1.7)&&Grade<=(1.849999)) message="C-"; else if(Grade>=(1.01)&&Grade<=(1.3)) message="D+"; else if(Grade>=(0.85)&&Grade<=(1.00)) message="D"; … | |
| I have a problem with case sensitive input my options are s and b and how to make a program when I input capital B or S to continue? [CODE] // options for selling and buying stocks System.out.println("\n"); System.out.println("Options as single upper or lower case character : "); System.out.println("\tB to … |
Hey guys, I've seen very limited examples out there about this unsupported function, however I am sure there must be a quick method to get this done with the Affine Transform ? Any ideas appreciated. Cleo | |
Well I was an old vb.net programmer,but not very professional and so with Java. I know the basics stuff how to think and how/why to write variables, methods, functions, threads, networking using streams or packets, and even I can write a database program which retreive records and insert records in … |
The End.