@# Quotes DB     useful, funny, interesting





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



Comments:

<0> night all
<1> sleep well MbGone !
<1> now bGone ;-)
<0> :)
<2> hi
<2> who knows how to place a frame in center of screen ? setLocation(??)
<3> setLocationRelativeTo(null);
<2> aha i found http://www.velocityreviews.com/forums/t147772-how-to-place-a-window-in-the-center-of-the-screen-.html
<2> the same
<3> setLocation also works
<3> but then you need to calculate the center
<2> but i dont know the resolution ?? setLocationRelativeTo(null); is the best
<3> but you can query the resolution
<3> and the size of the frame
<3> and do the math
<2> thanks



<4> hi.. i have and few JTextFields and a JButton.. when i click on the button i want to call a method arguments taken from the text fields
<4> how can i do that?
<3> add a listener to the button
<3> myButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myMethod(textfield.getText()}; });
<3> like that
<3> and yes, you probably need to make the textfield final
<4> alright thanks
<4> and what if i have a drop-down menu instead of a textfield... teamComboBox. ...
<4> teamComboBox.getText() ?
<4> teamComboBox.getComponet() ?
<3> is it a textfield or combobox?
<4> comboBox
<3> combobox is like a list
<3> so you need to get the selected item
<4> a drop-down list
<4> yes.. how do i get it?
<4> what is the method to get it
<3> getSelectedItem()
<3> http://java.sun.com/j2se/1.5.0/docs/api/ winhelpversion: http://www.allimant.org/javadoc/index.php
<3> you can look the methods up in the apidocs
<4> alright
<3> i'm off
<4> I'm using NetBeans 5.5 to create a JTable and it generatates the following code http://rafb.net/p/ePKV1D35.html . Instead of the generated Object [][] i want to use my own array.
<1> so get to it?
<4> NetBeans doesnt allow to edit generated code and if i edit in Notepad, it changes back as soon as i open NetBeans again
<1> so ?
<1> save the file, manually edit it, reload it in a copy of your project.
<4> so, how can i change it using NetBeans?
<4> i dont want to edit it manually every time i open it in NetBeans
<1> you don't have to
<1> it helps to actually understand the way your IDE works.
<4> i dont get it
<1> either you rip this out of the "automated code generation" control or you leave it in. There is no in between.
<4> so i save the project.. i edit the Object[][] in notepad and then what?
<1> heck, you could even add a new empty file, expand everything in the original, copy/paste and delete the original.
<1> use some imagination
<4> but i still need to make other modifications to the program in NetBeans after i make the edit...
<1> Silv: so? that can be easily done. Just not in an "automaticly generate my code" manner.
<4> when i reopen the file, it will change back everything i edited manuallt
<1> no it won't
<4> it does...
<1> you're not paying attention to what I'm telling you
<1> how on EARTH would it change a file which you created as 'empty file' ? thats IMPOSSIBLE
<4> * WARNING: Do NOT modify this code. The content of this method is
<4> * always regenerated by the Form Editor.
<1> don't be absurd
<1> now you're just being silly.
<4> fine.. thanks for the help
<1> Thats a comment put in there so that you don't change the code manually outside the editor. BUT if you change the entire file ("rip it out of automated code generation") that is becoming irrelevant.
<1> know your ide.
<1> and do some thinking... if you create an empty file so that you can put in whatever you want is it that hard to imagine that netbeans will never be able to change that code since this isn't an automated generated file?
<1> well, if you do follow my advice don't be fooled with the "// <editor-fold defaultstate="collapsed" desc=" Generated Code ">" which creates the small "folded box".
<1> thats just using some of the editors capabilities.
<4> im really confused right now..
<4> i edited the file in JCreator...
<4> then went back to NetBeans and everything was fine
<4> but then i changed the type of a column from integer to String and the Object array changed back to the generated one (full of nulls)
<1> ....
<1> you just don't understand netbeans. you don't change that code outside the editor and hope for the best.
<4> i realized i dont understand it



<4> that's y im seeking help
<1> you setup a project and you add a form which uses the form editor. Hence; it generates code. Then you cannot just change that code and hope for the best; the comments which you pasted make that clear enough.
<1> so... Create a NEW file which doesn't use the form editor. just like I said.
<4> 1 sec.. there is another file that was created by NetBeans... AppGUI.form
<1> don't bother with that.
<1> oh well, what am I saying. never mind.
<4> ok new file (different name) created
<4> what do i do with it now?
<1> just what I told you above.
<4> <1> heck, you could even add a new empty file, expand everything in the original, copy/paste and delete the original.
<4> ok done this
<1> cool. Now tell netbeans to use this file. That depends on what kind of file it is. Either its used by cl***name or, if its the main cl***, as main cl***. Done.
<1> one involves deleting (or renaming) the old file and then changing the name of this file. The other simply means changing the properties of the project to point to the new main cl***.
<4> but now i cant edit it with the form editor ... and that makes it useless for me
<1> Silv: tough luck not thinking things over eh ?
<1> I already told you that one either.
<1> errr... as well.
<1> either you use the form editor and respect what it does or you don't. There is no in between.
<4> ok nvm.. ill figure that out somehoe...
<4> when i run the project... i get <No main cl***es found>
<1> you're not paying any attention to what I'm telling you.
<4> this is happening with the original file
<1> anyway; what kind of "problem" are you trying to solve here anyway? The form editor only creates code to setup the GUI. Everything else can be determined by you. Either through the setting of properties or by adding your own code. You don't need to add the generated code. EVER.
<1> errr. change the generated code.
<4> im over with the generated code problem...
<1> figures.
<1> well, then I'm over with this "problem"
<4> when i try to run a project created in NetBeans i get <No main cl***es found>
<1> so define a main cl***.
<4> how?
<1> I told you above.
<1> hint: it involves the properties of your project.
<4> thanks for the hint.. that's what i needed
<1> aaah, thats good.
<4> now nothing happens when i run the project :(
<4> I went to project properties > run > Main cl***, but it said no main cl***es found
<4> so i typed in the main cl*** that i want to be used
<1> ....
<1> instead of simply using the pull down menu and selecting the available cl***es.
<1> well, I'm not wasting more time over this.
<4> what pull down menu?
<1> Clackwell: guten abend Clackwell ;) Es freut mich dich wieder hier zu sehen </offtopic> :)
<1> oh well, pull down or selction panel. either way; you can select the available cl***es.
<4> there is a selection panel, but it says <no main cl***es found>
<1> then your project doesn't have a main cl*** which can be used.
<4> what is a MAIN cl***?
<1> a cl*** with a main() method ofcourse. It helps you know your basics.
<4> that's what i thought.. and 2 of the files in the project have main methods
<1> they don't.
<1> otherwise netbeans picks that up.
<4> im 100% sure they do
<1> good for you then.
<1> report a bug to the netbeans team then :P
<4> ok i found what the problem was.. when building the project, the file that contained the main method wasnt compiled
<1> that doesn't matter.
<4> it compiles automatically b4 adding to the jar file?
<1> a main cl*** is detected due to the main() method, even before its compiled.
<4> hmmm.. i see
<1> create empty file, add an empty main() method, and check the run options in the project properties. Presto; a new main cl*** is available.
<4> how can i compile and run only that file then?
<1> actually READ the netbeans tutorial or go over the pulldown menu items.
<1> anyway, I'm out. this is indeed a waste of time IMO.
<5> hello people
<5> anybody can help me...where will i copy mysql connector/j.jar inorder that java and mysql communicates
<5> what folder? how?
<6> 'lo LLyric
<7> hello
<7> anyone alive today?
<8> help please.. anyone familiar with the SavitchIn cl***?
<6> never heard of it - what library is it from>?
<8> hmm.. don't know.. twas just given to me
<8> the cl*** was just given to me
<6> for any reason? the .java or the .cl***?
<8> the .cl***


Name:

Comments:

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






Return to #java
or
Go to some related logs:

linux spawnl c++
#apache
Harddrive Image + xcopy + Ghost
ANDI.LV
kif insaqqi il pjanti
#chatzone
#AllNiteCafe
#php
mysql query log parameters -slow
#MissKitten



Home  |  disclaimer  |  contact  |  submit quotes