32,199 Topics

Member Avatar for
Member Avatar for Pravinrasal

I want to increase column width automatically when record is added or record fetched from database in jtable in java.

Member Avatar for JamesCherrill
0
85
Member Avatar for ashley808

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 …

Member Avatar for JamesCherrill
0
757
Member Avatar for ali11

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 …

Member Avatar for JeffGrigg
0
741
Member Avatar for jinglylime

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 …

Member Avatar for mKorbel
0
92
Member Avatar for TheHelp

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 …

Member Avatar for TheHelp
0
91
Member Avatar for Dmiller071

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, …

Member Avatar for Dmiller071
0
1K
Member Avatar for sidra 100

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 …

Member Avatar for Taywin
0
163
Member Avatar for yapaarachchi
Member Avatar for TheSomalilander
0
212
Member Avatar for nimka

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 …

Member Avatar for Taywin
0
135
Member Avatar for gouki2005

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?

Member Avatar for peter_budo
0
242
Member Avatar for strongguy12345

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 …

Member Avatar for strongguy12345
0
248
Member Avatar for Dmiller071

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 …

Member Avatar for Dmiller071
0
285
Member Avatar for sha11e

[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.. …

Member Avatar for ~s.o.s~
0
105
Member Avatar for greenq

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 …

Member Avatar for Taywin
0
2K
Member Avatar for kei01040

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 …

Member Avatar for Taywin
0
7K
Member Avatar for jrock2004

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.

0
72
Member Avatar for peter20

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 ... …

0
50
Member Avatar for sanzhar

how to play from bytes (like sound) but without filename.... I read from InputStream by bytes, it must play... It is like sound streaming...

Member Avatar for sanzhar
0
52
Member Avatar for dark_sider_1

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 …

Member Avatar for Taywin
0
213
Member Avatar for jackmaverick1

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

Member Avatar for JamesCherrill
0
103
Member Avatar for shack99

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 …

Member Avatar for peter_budo
0
267
Member Avatar for DaniwebOS
Member Avatar for KhaosElement

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 …

Member Avatar for mKorbel
0
1K
Member Avatar for Bobonoinc

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 …

Member Avatar for mKorbel
0
127
Member Avatar for canarian

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 = …

Member Avatar for mKorbel
0
148
Member Avatar for KunioUnio

[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; …

Member Avatar for stultuske
0
265
Member Avatar for TigerTeck

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"; …

Member Avatar for TigerTeck
0
142
Member Avatar for mehnihma

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 …

Member Avatar for mehnihma
0
150
Member Avatar for StephNicolaou

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

Member Avatar for mKorbel
1
4K
Member Avatar for danthevan

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 …

Member Avatar for JamesCherrill
0
203

The End.