32,204 Topics

Member Avatar for
Member Avatar for IndieDeV2002

I have been developing a simple java game, however I would like to add some Music to my game because it seems quite boring whenever you play it.

Member Avatar for bCubed
0
920
Member Avatar for Slavi

Me as one of the users in Dani web and a person who has interest in Java, I've tried to solve if not all, most of the begginers problems. I've even tried to solve some myself afterwards however, now I ran out of ideas. I would also like to move …

Member Avatar for JamesCherrill
0
472
Member Avatar for 2384443

well guys, i wanted to try somethng fun in java, so i made a simple form type navigation program.. i can compile this file, bt i cant run it..NOTE: i have no issues in my java software.. import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.regex.*; public class Nav2 extends JFrame …

Member Avatar for 2384443
0
242
Member Avatar for RAJboss

function generateHashLink($service_domain, $file_path, $url_signing_key ,$expiry_timestamp = NULL){ // + and / are some of represented chars of based64 encoding (8 bits) // + is 62 and / is 63 and these char should be replaced by other predefined chars $search_chars = array('+','/'); $replace_chars = array('-', '_'); if($file_path[0] != '/'){ $file_path …

Member Avatar for peter_budo
0
297
Member Avatar for Doogledude123

My girlfriend, as confused as she is when I talk about programming, wants me to program her something. She's away on vacation to Australia right now. Of course, I told her I would program something for her in time for when she gets back. But the part that I'm stuck …

Member Avatar for kb.net
0
190
Member Avatar for xxwikkixx

I am trying to send some strings on my android device using bluetooth to my arduino so I am wondering if my logic is correct for my code. The part I am stuck on how to implement if all arguements are OK then it should send String temp = "t"; …

Member Avatar for Taywin
0
257
Member Avatar for funnym3

Hi guys, I'm new here and I have a activity in my java class. my instructor want to sort all the given names after they added to the list. can you guys help me with it? thanks here's my code: import java.util.*; public class Test{ public static void main (String …

Member Avatar for funnym3
0
131
Member Avatar for Violet_82

Hi all, I started to look into event handlers, and there is something I would like to ask, sorry if this is a silly one. I can see that different Java components generate different events when the user interacts with them, but when it comes down to 1)which interface the …

Member Avatar for Violet_82
0
303
Member Avatar for anand01

Hi all, I have employee class which I have 100 variables with getters and setters. now I am passing employee object to processing method. Now I want to read all values in processing method. Should I want to use getter for all member? Is there any way to achieve this. …

Member Avatar for JamesCherrill
0
289
Member Avatar for reuben_1

Hi there, I would like to make a basic plugin with a /hello command that when types outputs "Hello, user!" or there minecraft user name I have done all the code, and I have a problem of which the server says: [16:02:10 ERROR]: Could not load 'plugins/GreetingsPlugin.jar' in folder 'plugins' …

Member Avatar for stultuske
0
92
Member Avatar for Richa_2

interface Data { public void load(); } abstract class Info { public abstract void load(); } public class Employee extends Info implements Data { public void load (){ System.out.println ("loading"); /*do something*/ } } Why this code is correct ? Is it is not compulsory to deine the method declared …

Member Avatar for stultuske
0
311
Member Avatar for dwel
Member Avatar for chdboy

This is the code void CreateGUI() { try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); //myPicture = ImageIO.read(getClass().getResource("Companylogo_FINAL.jpg")); /*java.net.URL u = getClass().getResource("/resources/Companylogo_FINAL.jpg"); System.out.println(u); myPicture = ImageIO.read(u);*/ /*try {*/ //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); /*} catch (IOException e) { }*/ ImageIcon img = new ImageIcon(myPicture); //frame.setIconImage(img.getImage()); } catch (IOException e1) …

Member Avatar for chdboy
0
480
Member Avatar for chdboy

Here is the error I'm getting Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input == null! And here is the code try { //myPicture = ImageIO.read(new File("Companylogo_FINAL.jpg")); myPicture = ImageIO.read(getClass().getResource("/resources/Companylogo_FINAL.jpg")); ImageIcon img = new ImageIcon(myPicture); frame.setIconImage(img.getImage()); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } JLabel lbl = new …

Member Avatar for chdboy
0
2K
Member Avatar for johnson_2

1. I created three JLabels(one,two,three) and add a mouselistener to it. 2. For every even turns, the program will allow me to click any of the JLabels **once** and print out the JLabel I have clicked. My program is throwing me the following errors Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java …

Member Avatar for johnson_2
0
274
Member Avatar for moaz.amin.37

if a program throw 2 exceptions can we handled it by user defined exception.for example import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) …

Member Avatar for JamesCherrill
0
254
Member Avatar for didi1111

i have a jframe JFrame f = new JFrame(); f.setvisible(true); I want when I open this frame it play a sound what can I do in java?

Member Avatar for Hiroshe
0
53
Member Avatar for moaz.amin.37

Following exceptions are `Checked Exception` or `Unchecked Exception` ArrayStoreException IllegalArgumentException

Member Avatar for JamesCherrill
0
288
Member Avatar for moaz.amin.37

exception is a run time error,then why exceptions are again classified into compile time exception and run time exception,in that case it should be run time exceptions only.please give explanation with suitable real time example

Member Avatar for moaz.amin.37
-1
329
Member Avatar for Slavi

So, basically I tried to do everything i found to fix this but nothing really worked .. (It works fine on my 32 bit pc using elementary os(Luna linux). However my laptop has Kali Linux 64 bit. I have chromium installed. Some of the things that I tried which worked …

Member Avatar for Slavi
0
174
Member Avatar for chdboy

import java.awt.Frame; import java.awt.SplashScreen; import javax.swing.JOptionPane; public class NewFrame extends Frame { public NewFrame() { // TODO Auto-generated constructor stub SplashScreen splash = new SplashScreen(1000); System.out.println("This is working"); } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //SplashScreen splash = new SplashScreen(2000); …

Member Avatar for JamesCherrill
0
299
Member Avatar for screenedcreamy

I've been programming in java for almost 5 years now. I'm self-taught, so while I know how to program, I don't know some of the more formal aspects of computer science. So if i were to brush up my knowlegde on algorithms and data structures using java which books can …

Member Avatar for screenedcreamy
0
233
Member Avatar for brittney_2

I don't have a code that needs solving, but merely a simple explanation if possible from an example in a book. There isn't much explaining and I just need to know how this line of code checks to make sure the date entered does not occur in April. The [0-35-9] …

Member Avatar for brittney_2
0
210
Member Avatar for moaz.amin.37

i am confuse about `paint()` method in applet .The confusion is that paint method is getting object as parameter of Graphics class like this `public void paint(Graphics g)` and i read that the Graphics class is an abstract class then how we create object of Graphics class and now you …

Member Avatar for JamesCherrill
0
377
Member Avatar for samuel.tenderfeet

I recently submitted an assignment to my instructor, and i got a less than desirable grade and the jist of the marks were that iw as using hard coded variables so can someone explain to me how to use the getter method a little better? (i assume thats what i …

Member Avatar for stultuske
0
145
Member Avatar for abeer araji

thanks all for help im new in the website and i dont even know how to use it well im not a cheater or any thing else and i will not copy past any thing !! Im here just to learn

Member Avatar for JeffGrigg
0
134
Member Avatar for Violet_82

Hi guys, I run into a problem. I am trying to write a small program. There should be 4 radio buttons and each of them controls the colour of the Content Pane. The problem I have is with the anonymous inner class (I hear JamesCherrill muttering "why do you bother?", …

Member Avatar for JamesCherrill
0
295
Member Avatar for Jack_9

In my opinion, c# is better then java. Espicially because it runs upon the .NET framework. But java can run on virtually any device. They re both alot alike, so which one would be better to learn?

Member Avatar for ChrisHunter
-1
236
Member Avatar for asaidi

Hi i m using my host to save mysql database.. when i fill the fields the data is saved ..but i m keeping getting this error ..and really the data input is saved i dont understand why.. the error i get thank you in advance com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The …

Member Avatar for asaidi
0
299
Member Avatar for monkeybut

I am creating an AlertDialog that I can enter a new value into a SQLite database. The Insert method works if I call it by itself in the onCreate() method, but when I try to call the method in the setPositiveButton onclick listener it doesn't work, it gives me a …

Member Avatar for monkeybut
0
1K

The End.