- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
45 Posted Topics
Re: Im trying to wrap my head around this, maybe explain it a little better, What is it you accually want? and what have you tried? | |
Guys, Im wondering, If I have another class with a jpanel in it... and I add this to the jPanel, this should work correct? jpanel.add(new DoughOverviewList()); jpanel.repaint(); for some reason its not showing in my jpanel, /* * To change this license header, choose License Headers in Project Properties. * … | |
Hey Guys, So I have a JTextfield in the cells of 1 of the columns in my JTable I want to allow only numbers and up to one dot/period. Doesant need to contain a period. The persiod can be anywhere except at the end of the number. 1 ok .1 … | |
Hi Guys, I ussually dont post anything here often, just get everything off of everyone elses questions, but I'm having a strange problem that im scratching my head over, I have a JTable where I can Add and remove rows... This is just for testing purposes, I'm about to make … | |
Guys, Ive gotten it into my head to do somthing fairly difficult for me, I want to communicate with a swing application, to a proximetly sensor, and track live when it senses somthing and how many times it has sensed somthing, I want to use java. theres alot more to … | |
Re: You accually have to try to do it yourself... if you have an issue or you dont understand somthing... than you post... You cant seriously expect these awsome people here to just program things for you, thier here to help and give guidence.... not do you homework... | |
Re: Whats james said.. Grib bag layout. I was accually just starting to learn this, or more it was on my list of things to learn. I had watched this video on youtube few days ago and it really helped me understand it alot better.. how the layout accually works and … | |
I was wondering what would be the best way to implement an algorythm to figure out what side a circle has collided with a rectangle? After check to make sure a circle has collided with the rectangle im trying to figure out how to know what side of the rectangle … | |
Hi Guys, Im currantly having a problem with simulating balls bouncing of each other in a 2d space, everything is working and all, but it just doesant seem natural for me... If we had any math wizzes here now is your time please:) my circles are painted inside of rectangles..... … | |
Hi Guys Its me again, wasnt sure if i should start a new thread so i just did :) I completly redid the code Now im having a problem with the renderer again. It called called in the timer of the controller class... but it doesant get called? Also my … | |
Re: i just noticed this a few days ago when all those spam posts where on the main page advertising thier phone numbers, look like you guys are doing a great job at keeping these low lifes at bay first ive noticed and its been going on for years... goof job. | |
Currantly trying to make a simple game but i cant get the renderer to repaint. My problem is that i used to make everything in 1 class... much simpler. But now im just not sure anymore. This is what i have so far... it just wont repaint. (Note i have … | |
Re: What do you even mean? I want a java update version? I dont think Daniweb is the place to get your java updates.. you should probably search that one on google :). | |
Hi Guys Just starting to make my first java game, im getting a few errors. Im just trying to figure a few things about about the game loops before i get started and this is driving me crazy when i just call the renderer to repaint after i initialize the … | |
Good Day Lets say i have a array of integers.... -always differs in length I need to know all the possibilities the numbers in the string have to add up to a certain number. let say 5; and my array contains 1,3,4,3,5,8,2,1; than the possibilites would be.... (3,2)(4,1)(3,1,1) But i … | |
Ok, so I have a JButton on my program and later on in the program i want to put an image on the JButton I have many buttons that start out with images on them, but Im wondering how to add images to the JButton at a later date so … | |
Hey guys I'm looking for some insight in what would be the best way to stop and start a java program remotely with my cell. "For free". Lemme know ANY ideas!!!! Thanks Scheppy | |
Hi everyone. Ive finally figured out how to get my JOptionPane always on top no matter what but i cant figure out how to get the results of what button the user has clicked? and how to disable the x on the top left corner? This is what I have. … | |
Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that … | |
Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that … | |
Hello all Im trying to make java robot hold down the command key. I have used the following code. robot.keyPress(KeyEvent.VK_META); robot.Delay(5000); robot.keyRelease(KeyEvent.VK_META); This doesant seem to do the trick. Yes I have searched on how to do this but cannot find a working answer. Am I using the wrong keycode? … | |
Hello All. I have a program that automatically restarts itself atfer a certain amount of time. I am doing this to test some things out. The program is wrapped in a jar. I run the jar from terminal with java -jar ProgramName.jar It will run and will output all the … | |
Re: Do you think we are going to do your homework for you?? Why dont you first try to do it yourself..... and maybe we can help you when you get stuck, and remember if you get stuck, search around on Google and daniweb, because your question might already be answered. … | |
Hi all. What im trying to accomplish is to get strings from within a string. These strings are seperated with "//*//" an example would be String ExampleString = ("//*//helle//*//goodbye//*//1965//*//this is an example//*//the end"); then I would like to seperated into seperate strings. hello goodbye 1964 this is an example the … | |
Hi all. Im having trouble getting my menu to work on my window. this is what I have so far as for my code. package sparepartinventory; import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.*; /** * * @author jonathan */ public class SparePartInventory { /** * @param args the command line arguments … | |
I am having a problem with setting JButtons so the are not opaque to i can see the image behind them. I also have a JTextfield and here it is working, I dont know what i am doing wrong, I'm creating a gui for the mainmenu of my game. here … | |
I know that .bat isnt java, but I dont know were else to place this thread So ive finished my program, has sounds, images and other junk all in a folder on my desktop. as soon as you open the folder you can see the file program.java and also folders … | |
ok, so i have lots of audio in my program that only plays once, and that all just works fine and perfect This is what i do to play music [CODE] try { InputStream a = new FileInputStream ("Sounds-Music/MainTheme.wav"); theme = new AudioStream (a); } catch (java.io.IOException z) //catching the … | |
I'm having some trouble using getClientproperty() to get a string value btw, im using java 1.4.2, so no autoboxing I know how to get int values, and here is an example, which works perfect in my program, [CODE] cx = ((Integer) btn.getClientProperty ("cx")).intValue (); [/CODE] but when i try to … | |
Ok, so I have my code for the timer [CODE] computer = new Timer (4000, this); computer.start (); [/CODE] The timer starts at the end of a method, and is supposed to start another method via actionlistener after 4 seconds, the problem is, after 4 seconds, the timer gives a … | |
ok so I have a JButton that has an image on it, and then after 4 seconds i want to put a differant image on it but the problem is the first image wont load I'm using [CODE] button1.setIcon (icon); try { Thread.sleep (4000); //sleeping for 4 seconds } catch … | |
Is there a method to check if a JButton has an Icon? becouse I've been searching all over google and i cant seem to find anything | |
I'm trying to right a statement that depends on 2 JButtons not being enabled I know how to tell if they are enabled like this [CODE] if(myJButton.isEnabled()) { } [/CODE] But is their also a simple way to check if a JButton is not Enabled | |
Im making a program that has to call on a method when space is pressed,note it is the first time I'm doing a keylistener To do this i did [CODE]public void keyPressed (KeyEvent e) { int key =e.getKeyCode (); int space = 32; if (key==space) { } } [/CODE] and … | |
pButtonarray [x] [row].putClientProperty ("x", new Integer (x)); I'm using a version of java that doesn't have method overloading for putClentProperty so i have to type new Integer as seen above, and this all works perfectly now I'm trying to assign a boolean to the array like so pButtonarray [x] [row].putClientProperty … | |
I have a grid of 225 JButtons in a 2d array of 15 x 15 I was windering do i need 225 if (event.equals (Grid[0][1])) { } or is their a loops or something, thanks in advance | |
Ok, so I've imported import java.util.Random; and im trying to get a random number between 1 and 2, 1 and 4,and also 1 and 15, how would i acomplish this, i know how to generate random numbers, but not between 2 certain numbers?, how can this be accomplished? | |
Re: to delete a file i always use [CODE] public void DeleteFile () { File erase = new File ("Filename.txt"); erase.delete (); //deleting the file Statistics JOptionPane.showMessageDialog (infoPane, "The file has been deleted"); } [/CODE] | |
Hi all I'm wondering how i add Action listener to this Button It has no text, just an image, from an ImageIcon I tried I3 for the action listener but i doesant work [CODE] ImageIcon I3; I3 = new ImageIcon ("carrier.gif"); J1 = new JButton (I3); J1.addActionListener (this); J1.setBounds (420, … | |
Hi I have a small problem with with my bubble sort. Everything else in my program works fine if I remove my bubble sort. This is the part of code for the bubble sort. [CODE] //bubble sort based on animal breed if (numberofanimals > 1)//making sure there is more than … | |
Re: Exacly what Majestics said, just print out the String variable that user sentance was saved as, which happens to be [B]userString[/B] seen here [CODE]System.out.print("Enter a sentence: "); String [B]userString[/B] = cs.nextLine();[/CODE] ![]() | |
I have a extremely small problem, I think its my own fault, but i just cant seem to find what it is. I'm making a program with a gui, and in the gui there is a main menu with 2 JButtons. When I click on a JButton the JPanel/JFrame is … | |
Im trying to make a simple program.It just has a couple JButtons and JTextFields, but its looks kinda odd, and I was wondering how to change their size. Thanks In advance Scheppy | |
[CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; /* *Created by ************ *on Dec 28 *to calculate the area of multiple shapes */ public class AreaCalculator extends JFrame implements ActionListener { static JTextField triwidth, trihieght, recwidth, reclength, cirradius; static Container contentPane; static JPanel infoPane; static double circlearea; static JLabel circleanswer; public … |
The End.