Im not sure how to reference to JPanel when it was declared like this, I had someone else help me on JPanels and this is the code he used:
final JFrame frame = new JFrame("CIT Test Program");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setPreferredSize(new Dimension(350, 250));
frame.add(new JPanel()
{{
Not sure how to reference to JPanel to use BorderLayout.
How would I go about doing this?
Here is an easy question:
I have a struct which contains two hash tables and one vector. Im looking for a generic name for this kind of structure. Any suggestions? say factory?
Im making an app, and i want it to make a sound when a activity is opened , the sound file is in R.raw.sound_file , if someone could do some example code to make my app play a sound that would be great :)
hello java guys,
im thinking of a simple java app (command line) that connects to the internet to download xml file, the problem is that my ubuntu is using a proxy to connect to internet with username and password (tru http_proxy ="http://:@:" ). So My question is, could it be possible to write a java app to use http_proxy variable? instead of programmatically setting http proxy and host in every app i will write.
im very new to javascript, and writing this script to add up a shopping cart and print out subtotals and totals. it works in FF but not in IE. this function is called by onclick of one of three select options with a value of 0-25. it is in a js file called in the head. what it does is get the selected values as variables, parseint them, adds and multiplies, and changes the innerHTML of the table to reflect the subtotals, and total. FF does it great, but IE gives Nan. ive tried rewriting it a number of different ways, and many translations still work in FF but not IE8. ive made sure the variables and form id's arent repeated.
function gen_invoice() {
var scount = parseInt(document.shopcart.studentcount.value, 10);
var ycount = parseInt(document.shopcart.youthcount.value, 10);
var fcount = parseInt(document.shopcart.facultycount.value, 10);
//html output source is 3 selects like this, with diff ids and names:
//<select name="studentcount" id="studentcount">
//<option onclick="gen_invoice()" value="0">0 </option></select>
var cardcost = parseInt(document.shopcart.cardprice.value, 10);
//cardcost comes from hidden input value:
//<input type="hidden" id="cardprice" name="cardprice" value="25">
var totalsum = scount + ycount + fcount;
var grandtotal = totalsum * cardcost;
document.getElementById('s_price').innerHTML = scount * cardcost;
document.getElementById('y_price').innerHTML = ycount * cardcost;
document.getElementById('f_price').innerHTML = fcount * cardcost;
document.getElementById('grand').innerHTML = grandtotal;
//....
}
...after this there are 3 long loops for writing out some other forms, but they dont work in IE either because they depend on the selected values to be an integer. this part happens first and returns Nan, so im sure the problem is here somwhere.
I have literally hit my head on the table over this. You can imagine how frustrating it is to be able to write the entire rest of the site beautifully, but then fail at adding 3 numbers together. help please!
do you got the solution for your problem ?
im working on the exact same thing and cant get it to work...
if u could post the solution, it would be much appreciated :o
greetingz
msn: [email protected]
steam : [email protected]
How can i create a vanity url in codeigniter. Im having real trouble doing this in the framework. And there doesnt seem to be any good answers out there.
Im trying to fill a dropdownlist based on an other one:
Departments and SubDepartments.
i followed this link: http://www.sharepoint-tips.com/2007/01/infopath-form-services-implementing.html
when i try to fill in a form it gives me an error:
Request Failed (-- securityException) on this line:
q.FileLocation = q.FileLocation + "&FilterField1=Department&FilterValue1=" + GetDepartmentValue();
and the second dropdownlist (subdepartments) is not filtered.
Any idea what might be the problem?
Hi
im using qt , and i parse complex json data structure but i find my self doing to many
loops each time i need to parse this JSON , i wander how or what can be the best way to
handle big JSON structures
Why is that when I search a row in my database, it ended up 0 results? In fact, there are rows that meet my search criterion when I view them manually, but the search button doesnt work as it is. Heres how
you can see there are rows that have '0000-00-00 00:00:00' in them, but when I used the search feature, it ended up like this:
take note that Im entering it in the right field which is 'AcctStopTime'.
TIA
Hi All,
What is the best or preferred way to store data for a c# desktop application? I know this coupld depend on how I will be using the app but Im just looking for a simple and easy way to store data for c# applications.
Thanks
hi all, i m facing some problem in find function. im fetching value fro find function.i have model.contian another model .
Can i give conditions in contain in cakephp
is it possiblehi
hi. im new in MATLAB.
i think its a simple question.
i want:
a=1.154648126486416
to become
a=1.154
and not
a=1.54000000000
how do i do that without useing format('bank').
thanks.
I am updating a website to add some mobile friendly pages.
At the moment we have one big css page with everything in. My idea is to put all the mobile specific css into a separate file and then link both sheets. The mobile css will overide anything in the default css (bigger buttons etc).
Im quite new to css, what is the best practice?
Im using tinymce for text formating. I have html code like <span class="ps_bonus_text_wide_t" style="font-family: Michroma;">my text</span>. when i select that text and class="ps_bonus_text_wide_t" i need to change it to <div class="effect"><span class="ps_bonus_text_wide_t" style="font-family: Michroma;">my text</span></div>. How i can to verify class="ps_bonus_text_wide_t" ?
Im building an app in c# using WPF and i need it to bind to some keys. Ive found some links but not work well with my setup. Anyone done this before?
also if i could bind to the windows key would be great.
Hey guys
how can i query my mysql database and fetch rows which are posted in earlier 3 days
i know how to fetch todays's rows but not 3 days ago
time will save in my table like this :
2010-01-20 19:17:49
and this is what i know :
SELECT id FROM pages WHERE date=now()
but i need to show posts in 3days
and im looking for a simple and straight solution ,because i know how to do so in long php codes
I am creating a booking module using MOSS 2007.What i would like to know is that is it possible to create a webart that will show only the Daily view ,which will be connected to the central Calender..
Basically what im trying to achieve is this.
Each Room must have its own webpart that shows the bookings only associated with that room,so ultimately you might have two rooms that are booked at 8:PM(Same Day) showing on the central Booking calender.....
Help would be appreciated
if i have a script which insert a data then exit
the script will be opened by 100 user at same time or within 2 mins
actually im doing email tracking
so pconnect is bettwe or connect is better to reduce the resource
i have close when after insert
hey guys
im using a form in php to submit some information into my database
so i used two function to do this
but how to show the result in th same page that has the form
Hello Im currently writing a product syncronisation script for magento. I know how to add a new product with a given atribute set. However one of the atributes i am using is a size field. When a new size is encounterd I want to add this option to the attribute, I am wondering how to do this please?
Ok what i need is help..haha ok im making a music app with a paino but i need to be able to hold the sound long or short. So like if i hold a button it will start playing the sound but if i let go it stops WITH A FADE so how ever long i hold the button down that is how long the sound will play (that is ntill the sound ends)