• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

button and displaying results

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to write a program which allows you to enter a student name, 3 grades, click either alpha or numeric radio button, hit calculate and display results. All these must be in the same window. The problems I am having are 1) how do you display the results of the ButtonListener in another panel, is this possible? and 2) how can results be displayed as either a letter or number in the same field in another panel? I cannot even send any code because I have no idea how to write it. Any help will be appreciated.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are You Using Swings or SWT. Please be More clear about the Line "display result in the field but in other panel".

Well if you are doing something in Panel1 and want to display result in Panel2(Some Text Field).

Then When you hit the Calculate Button in Panel1.Add a SelectionListener and create a TextField in Panel 2 and set the Text.
Dispose the Panel 2 if some other operation is going.
 
Meagan Malcolm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using Swing...this is suppose to be a beginner program. I wish I could post what it's suppose to look like but the example won't copy and paste. The farthest we've gotten is beginning arrays, which I haven't even approached this subject within the program for trying to get the program to, at least, display what it's suppose to for the info entered. I'm trying to get a results field in a window with a lot of information, meaning there's no way to get the calculate button in the same panel with the results display. Also, even though a number grade is entered, after choosing a radio button for alpha grade or numeric grade and selecting calculate, it's suppose to display the appropriate type of grade. I cannot figure out how to get the display field to accept either type of grade. I hope I'm not being too confusing, but I am confused myself.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Lost Mind " welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Vivekkk Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah its very confusing.Well the only thing i figured out from it is:
You have a Text Field for Grade,2 Radio buttons for Type of Grade Numeric and Alpha.
There is Button Calculate,which displays the result either in Numeric format or Alpha Numeric Format(As per the Text Entered in the Text Field).

Have I got it right.




 
Meagan Malcolm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry I'm explaining it so badly...yeah, you've gotten it right. At this point, I believe anything remotely close to what I'm trying to do would help. Thanks for replying.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you looking for this:
 
Meagan Malcolm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, my GUI interface has all those fields. I thought I figured out how to calculate the grade but when I run it, I get this bizarre list of errors (compiles okay). Then the instructor threw in accessors, mutators and arrays. Unfortunately, I find myself absolutely lost on how to put all of it together....I am about to give up and take the F.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i hav a dought, with java include swing concept, can we move a file from one drive to another?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
File.renameTo can do more than just renaming files.
 
reply
    Bookmark Topic Watch Topic
  • New Topic