32,204 Topics

Member Avatar for
Member Avatar for bbman

Hi all, here's a kinda bullet-pointy explanation of what i have - I have a simple JFrame - I create a JPanel called 'ContentPane' [CODE]contentPane = new JPanel(); contentPane.setBackground(SystemColor.window); contentPane.setBorder(new LineBorder(SystemColor.inactiveCaption)); contentPane.setLayout(null); setContentPane(contentPane);[/CODE] - the JFrame has a [CODE]JMenuBar -> JMenuBar -> JMenuItem[/CODE] - The JMenuItem has a MouseListener and …

Member Avatar for JamesCherrill
0
161
Member Avatar for geekman89

Hello everybody. I am in need of an answer. How can I use the text from a string and use it as a variable's name? For example: I have an array: int xyz[] = new int[5]; And say I want to check if it's name is the same as a …

Member Avatar for geekman89
0
488
Member Avatar for canarian

Hello! I need to ask password to user, to get administration rights for my java application when it works under linux (or any POSIX). Can someone help me about that? Thank you!

Member Avatar for Taywin
0
91
Member Avatar for Joey_Brown

Hello; I have a following method that allocates memory for some objects. [CODE] public static int formStyleOfLyle(int a) { ObjectL[] numberL = new ObjectL[a]; if(numberL==null) { return -1; } return 0; } [/CODE] I really dont know what this does; but I need to check the return value of this …

Member Avatar for Joey_Brown
0
124
Member Avatar for Yutxz

My program receives no errors or run time errors, but for some reason it runs infinitely. I need help pinpointing the problem D: I will post additional information about the exercise I am trying to solve in this thread. [CODE] package captcrunch; /** * * @author Josh */ public class …

Member Avatar for JamesCherrill
0
217
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
758
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
745
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
215
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
273
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

The End.