32,204 Topics
| |
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 … | |
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 … | |
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! | |
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 … | |
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 … | |
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 = … |
The End.