@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> hello, can anyone pls tell me where to start, i'd like to learn how to make an mp3player app for my mobile phone (the default one can't run in background:P)
<0> can someone recommend a pdf or smth ?
<1> if i dont want the user not to leave any textfield empty in a form before submitting it then i should check them one by one ?
<2> axius: buy a new phone ... cheaper
<2> form ... submit ... is that html were talking ?
<3> think javazoom has a mp3 player midlet
<3> http://www.javazoom.net/index.shtml
<3> JLayerME: mp3 decoder library for j2me
<1> no java i collecting data from user in a jframe with jtextfields and i have a save button which i dont want it to work unless all the jtextfields contain some data
<0> znabela: i like to learn... could you pls tell me where to start in learning j2me ?
<3> FAIR_MUTEX, add a focuslistener to all textfields
<3> and listen for focuslost
<4> well.. j2me is useless if you are unfamiliar with java
<3> on focus lost check if all textfields contain text
<0> okay, thanks :) now i know where to start :)
<1> u mean somthing like text.addfocuslisten(button) ?



<3> textfield.addFocusListener(new FocusListener() { public void focusLost(FocusEvent e) { } } );
<3> more like that
<1> ok thank you ill read about it :)
<3> you can also use a FocusAdapter instead
<3> no need to implement all focuslistener methods that way
<3> so. textfield.addFocusListener(new FocusAdapter() { public void focusList(FocusEvent e) {}});
<1> a ok thats better
<1> can i listen on events on a Joptionpane ?
<5> if you can add a listener yes
<6> Hi kmh !
<6> You are so c00l ! ... http://pics.obra.se/lawl.gif
<7> hmm. opensessioninview almost feels like cheating..
<5> hi teralaser
<5> wlfshmn : hide it from your wife then
<7> kmh: no wife or other entity that would have any say in the matter ;)
<1> to coordinate events in my application should i use an Executor ?
<1> i have a scheduler and i schedule tasks one by one but at the same time it might be importing some tasks from a file what should i do so that i coordinate these tasks
<8> morning
<8> FAIR_MUTEX - what do you mean by cordinate these tasks?
<1> its ok mbgone i found out how :)
<1> implementing listeners is fixing
<1> if i have dataValues = new String[100][4]; can i iterate and ***ign somthing like this dataValues[iY][] = {{"a"},{"b"},{"c"},{"c"}}; ?
<9> anyone know how to get a java applet to preload graphics before running?
<1> if i am writing my own listener and my own event do i have to extend existing ones ?
<1> nothing found
<1> http://www.javaworld.com/javaworld/javaqa/2000-08/01-qa-0804-events.html
<1> good tutorial
<8> FAIR_MUTEX - you dont have to extend anything, you can specify your own interfaces
<8> check out the observer design pattern
<1> mbgone i did it the way it is over here http://examples.oreilly.com/jenut/oreilly/beans/yesno/YesNoDialog.java but it is giving me a null pointer exception
<4> Then you made a mistake somewhere. Probably an uninitialized variable.
<4> personally I'd recommend: http://java.sun.com/docs/books/tutorial/uiswing/events/index.html
<1> thank you lion
<4> But that example is pretty straight forward too.. Just setup a cl***, an inner cl*** defining the actionlistener and then use it. Shouldn't give too much problems.
<4> I simply like the implementation approach better since you won't be messing with inner cl***es and it'll make your code a lot easier to read. But thats just preference, also based on the differences between plain and inner cl***es.
<4> And ofcourse, pops into my mind; the type of listener also matters.
<8> hey Lion-O
<10> where i may download java?
<10> where i may download java book?i want to learn it.
<10> please help
<10> !java
<11> hi
<12> www.java.sun.com
<11> this code gives Exception in thread "main" java.lang.Error: Unresolved compilation problem:
<11> Exception in thread "main" java.lang.Error: Unresolved compilation problem:
<11> http://pastebin.com/852731
<11> any idea why?
<11> oki i found why
<13> i need to create a server that accepts multiple connections in different threads and then allows one thread at a time access to a database
<13> i ***ume i am gonna need some sort of collection to keep the threads in
<13> is a queue a good idea ?
<11> if i implement MouseListener interface to a cl***, do i need to declare all of the mouse events?
<11> mouse event functions i mean
<8> newbea - yea, unless you are using a MouseAdapter
<11> MbGone: is this because MouseListener is an interface?
<11> MbGone: as I recall all of the functions of an interface must be declared, is this correct?
<8> newbea - all functions of an interfaces must be implemented unless you are declaring your cl*** as abstract
<11> thanks
<11> MbGone: so is it logical to implement unnecessary functions of an interface just empty?
<8> newbea - that depends, as i said in your case you can simply extend MouseAdapter and overide the function you need
<11> MbGone: ok thanks



<1> i cant understand how come myobject.addmyevent(this); this is seeing it as null :/
<14> test case?
<1> i id an if statement and it is not null :/
<1> but when i add it to the vector it is becoming null
<1> protected Vector <myListener> myListeners = new Vector<myListener>(0,1);
<1> am i initialising it well ?
<14> Provide complete, compilable Java SOURCE CODE that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
<8> FAIR_MUTEX - what exactly are you trying to achieve with new Vector<myListener>(0,1);
<1> an empty vector that increments its space by one each time i add a listener
<1> but when i do if i check on l it says its not null but when i add it to myListeners.add(l);
<1> after i loop in it i find it null
<14> provide a test case.
<1> ok ill try to minimize it
<1> http://javafaq.mine.nu/lookup?50&wb=true
<14> FAIR_MUTEX: does not compile for me.
<1> ok forget it
<14> FAIR_MUTEX: http://javafaq.mine.nu/lookup?364
<14> a test case is not a waste of time, should you think that.
<14> the least it does is help you try to understand what you are doing.
<1> i know but its hard to provide
<14> it is not if you would understand what you are doing.
<14> if you do a, b, c in a large program you know that all you need to do in a test case is a, b, c.
<1> well for me it is am not am expert
<7> uhm...
<7> work is starting to make less and less sense..
<14> but if you don't know what you are doing, you have to first sit down and think about what you are doing, you don't know that you are doing a, b, c.
<7> looks like I'm beeing set to ***ist the design of a .net component, even though more than half the project is written in java, and I'm the only one with a background in it..
<14> if you create a vector, put something into it in another method, and then in yet another method find that the reference to the vector is null, put that into a test case, just to see if you can reproduce the problem.
<14> Manager: "We have a new project!" Programmers: "Java! Java! Java!" M: "It's a spreadsheet; we'll have to use JTable extensively." P: "C#! C#! C#!"
<1> ok ill try to reproduce it
<8> FAIR_MUTEX - another way to go is to debug your program, and see whats going on
<14> MbGone: my ***umption is that typically there is far too much to keep track of in a program, which is why people end up confused and without an idea where to start looking in the first place.
<7> Clackwell: client-server CRM stuff, I'm going to outline an outlook-integrated offline-client
<14> a test case dramatically reduces the number of things to keep track off.
<14> wlfshmn: what about existing solutions? sounds like a cl***ical case for existing crm systems.
<7> Clackwell: we are replacing/reimplementing our existing CRM solution
<7> Clackwell: we are an ERP provider and as such want an inhouse offering to handle to common case
<14> wlfshmn: hm.
<14> we just ordered meeting maker licenses. we could sit down for a few months and write something similar, but...
<1> clackwell on its own its working
<1> i just copied and pasted as is and used strings
<1> in the vector
<1> i found the problem clackwell
<1> http://www-128.ibm.com/developerworks/java/library/j-jtp07265/index.html read the Initialization safety risks
<1> it explains it all
<1> no i go fixing and see what happens
<1> look i think my problem is that the cl*** that takes care of the handling of the events is a property of the cl*** that i am registering as a listener on this property if this is not possible please point it out
<8> FAIR_MUTEX - have you tried debugging ?
<1> i ve tried what every came up to my mind
<1> i isolated the vector and checked it with strings and it works fine
<8> FAIR_MUTEX - use a debugger
<15> !start
<3> evening
<3> start what?
<15> mmau vam
<13> i've got some threads in a list each thread has a socket connection to a client
<13> and i only want to allow one client access to the database at a time
<13> how can i do that ?
<3> synchronize the db access
<13> yea i thought of that
<13> what i mean is if a client asks for database access and its locked
<3> then it needs to wait
<13> how can i get it to wait in a queue for access
<13> i don't want it to be just rejected
<3> its standard behaviour
<13> ok
<3> if your thread calls a synchronized method and another thread is accessing it then it will wait
<13> so i don't actualy need to have a list of the threads and queue them myself they will just do it all themselves
<13> is that correct ?
<3> queue what?
<3> commands?
<3> you have a serversocket listening for sockets, when you accept a socket you create a thread, open the socket and start listening
<3> a message 'getArticles' comes in, you call some database cl*** like dbManager.getArticles();
<3> which returns a list, you convert the articles to text messages and send them over the socket back


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

#c++
school architetchure
#AllNiteCafe
#c
casino3 mrc
#chatzone
#php
a subsystem can't be inferred and must be defined
danisad
#asm



Home  |  disclaimer  |  contact  |  submit quotes