Does this mean that ListNode can access Lists's private members
No, it's the other way around. By declaring List as a friend, the ListNode class gives access to its private members to the List class. It's like an invitation, ListNode invites List into its access-space.
Just think about it as a house. ListNode has a house with private things in it. It declares List as its friend, like giving List the keys to its house and thus access to its private things.
If it were to work the other way (as in, "ListNode can access List's private members"), then it would be the equivalent of ListNode declaring itself the friend of List and inviting itself into List's house. You can't do that, just like you cannot walk up to some stranger's front door and declare yourself their friend and invite yourself in. It always works the other way, they invite you in.
If I understand you correctly, you want to select the xml file path from the listbox. The .SelectedItem.ToString() property should be able to give you the selected file path, instead of looping through all the listbox items.
warm regards for replying and putting your efforts in my problem.It will be cool if i just write my code lil bit what i was trying..like..-->
Taywin you didn't get my prob..,i am trying to show a picture on a jLabel in my jPanel (netbeans) on the basis of the name of the particular picture.
As we get the name of a picture from any of the resources whether static or userdefined ,putting that name into a condition check and then after displaying it on the jLabel Swing Control Component. Thanks buddie..,but i found another way to taste the HONEY without bees.. thanx ...!!
Slavi i also tried the code you put up in your reply..,but there was no big difference. As we have to pass the value for the icon in your code and i directly put it as using setIcon method, both gave me the same result. then i tried the switch case the basic one hahaha i wish to tell you it really works..,wooohuuu thanks a lot for all my friends for giving me useful advices THANX guys C U soon :)
case "sukhi": jLabel1.setIcon(new ImageIcon("C:/Users/M@NEY/Documents/NetBeansProjects/appextra/src/sukhi.jpg"));
case "smiley": jLabel1.setIcon(new ImageIcon("C:/Users/M@NEY/Documents/NetBeansProjects/appextra/src/smiley.jpg"));
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Process.Start(My.Computer.FileSystem.CurrentDirectory & "\first.exe")
Timer1.Interval = 10 * 1000 'ten seconds
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Process.Start(My.Computer.FileSystem.CurrentDirectory & "\second.exe")
Yes, people here will help - but do read the DaniWeb rules first, especially
"Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules
Can anyone help me to write java program?
I'm using BlueJ for this assignment.
This assignment is to write a program to calculate loan repayments. Banks and/or finance companies loan customers money (usually called a mortgage) so they can make large purchases (such as a house or a car). Each month a repayment is made that includes interest due on the outstanding amount, plus some of the remaining amount (called principal). Over the life of the loan, the amount of interest payable per month reduces, whilst the amount of principal paid each month increases. You will write a mortgage (loan repayment) calculator in java to run in the terminal window of BlueJ.
The monthly payment for a fixed rate mortgage is the amount paid by the borrower every month that ensures that the loan is paid off in full with interest at the end of its term.
This is calculated by the following formula:
c = (r / (1 − (1 + r) − N))P
r is the interest rate r (expressed as a decimal, not a percentage, i.e., divide the quoted yearly percentage rate by 100 and by 12 to obtain the monthly interest rate);
N is the number of payments usually 12 times the duration of the loan in years;
P is the amount borrowed P known as the loan's principal;
The program will have a 3 option menu as shown below to Exit, calculate a specific mortgage repayment, and to produce a mortgage repayment table;
The program will use the BlueJ terminal window (again as shown below);
The program will have ‘reasonable editing’ – i.e. – one should not be able to enter ‘fred’ as a mortgage amount;
Numbers output should be formatted nicely, in a similar way to the sample run.
You shall test it with at least four test cases and provide screen dumps in the report to evidence your testing;
You should provide a short report and assignment cover sheet; the report must include evidence of testing and also a list of any problems you encountered and how you overcame them.