JOption Programming Software Development by Petranilla Hi Everyone, Happy 2013 to all.I'm using JOption to print a table, how do I align the columns? …I am using a single variable for the JOption. Example: QTY ITEMS UNIT PIRCE AMOUNT 1 Milk-Anchor 100… Re: JOption Programming Software Development by Petranilla Thank you for the reply. Does it work in JOption. The requirement is to use JOption. Many thanks. JOption.Pane displa Programming Software Development by javanewbie … am having a bit of trouble displaying someting using the JOption.Pane format. I know we are not supposed to pose… Re: JOption.Pane displa Programming Software Development by bjj … am having a bit of trouble displaying someting using the JOption.Pane format. I know we are not supposed to pose… Re: JOption Programming Software Development by tux4life Take a look at: http://www.homeandlearn.co.uk/java/java_formatted_strings.html . Use `String.format()` instead of `System.out.printf()`. Re: JOption Programming Software Development by tux4life Yes, it will work with JOptionPane, as long as you use `String.format()` to format it into a String. After that you can output the String using a JOptionPane. I am aware that I linked to a page using `System.out.printf()` but it is analog for `String.format()`. Re: JOption Programming Software Development by Petranilla Thank you very much for the help. Happy New Year! how do i insert joption pane code in this code,so the user. Programming Software Development by BEBELINDO … person if it is a palindrome...how do i insert joption pane code into this: public boolean isPalindrome(int start int… Need storage space for 2k, 4min footage using JOption Programming Software Development by abbyo … help in coming up with the correct answer for this JOption java program. I enter in 2k, 30fps, 4min, 0seconds, and… about JOPTION . .how to disable [NO and CANCEL] Programming Software Development by nipacayaljon … you guys help me because im only a begineer of JOPTION here is ma code: btw this is my assignment in… Re: JOption.Pane displa Programming Software Development by iamthwee Have you looked at using a GUI builder, such as netBeans? Re: JOption.Pane displa Programming Software Development by Metsfan147 What are you trying to do, exactly? The usual syntax is JOptionPane.showMessageDialog(null, "string"); However, if you're doing anything more advanced than a one line message, you may want to look into something more advanced than that. JOption output Programming Software Development by Ashenvale Hey guys :idea: This is my code [CODE]studNo = JOptionPane.showInputDialog(null, "Enter Student Number: "); studName = JOptionPane.showInputDialog(null, "Enter Student Name : "); prelim = Float.parseFloat(JOptionPane.showInputDialog("Enter Prelim grade : ")); midterm = Float.parseFloat(JOptionPane.showInputDialog… Re: JOption output Programming Software Development by stultuske if you want that, you have to put all of it in one String and show it using one JOptionPane MessageBox one option: [Code=Java] String before = " Grade Computation" + "\n" + "Student No. : " + studNo + "\n" + "Student Name: " + studName + "\n" + "\n" + "Grades: "… Re: JOption output Programming Software Development by Ashenvale I tried using the code you gave me but when I run it, this time, it doesn't show the remarks anymore [CODE]String result = new String(before);[/CODE] plus this part has yellow highlights and it says[B] [COLOR="Red"]Remove string constructor invocation[/COLOR][/B] anyway, I tried removing it but still nothing happens, the remarks still … Re: JOption output Programming Software Development by stultuske well ... I just wrote something in the lines of what you should do. yes, String has no constructor which takes a String as parameter, but I figured you would figure that one out. you can replace that line with [Code=Java] String result = before; [/Code] in your if statements, you can change the code in: [Code=Java] if (overallGrade >= 75) … Re: how do i insert joption pane code in this code,so the user. Programming Software Development by BestJewSinceJC [CODE]JOptionPane.showMessageDialog(null, "Your message goes here");[/CODE] Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by NormR1 [QUOTE]I should get 10.6842041GB (16.02630615GB total space needed). [/QUOTE] What do you get? You don't show what the program currently outputs. What is the program supposed to do? What is the relationship between: k, fps, min and seconds? I see that you are doing integer divisions. for example: gbyte = mbyte/1024 No rounding or remainders. 4/3 … Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by abbyo The program is suppose to output the space needed (in gigs, megs, whatever) for the digital film that has been produced. For instance, someone requested that they wanted enough hard drive space for a 2k, 4min, commercial. 1. We calculate 2k (which is 2048x1556 pixels). 2. Multiply by 4 channels. 3. Get the frames per second (common ans is 30fps)… Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by NormR1 Can you show me the arithmetic equation that computes the value. Did you see my comment about your code using integer arithmetic? If you don't understand what I mean by integer arithmetic, put a System.out.println("var=" + value); statement after every computational step in the program. Compare the printed results of each step with your… Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by abbyo I'm not sure what you mean by integer arithmetic? Do you mean int verses float or double? Here is the calculation for the program: 2048(pix) x 1556(pix) x 4(chan) x 30(fps) x 4(min) x 60(to get sec) / 8(Bit) / 1024(kB) / 1024(MB) / 1024(for GB) = [B]10.68][/B] 10.68 x .5 = 5.34 5.34+10.68 = [B]16.02[/B] Thanks for your help! Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by NormR1 this is the results of integer arithmetic: 4/3 = 1 NOT 1.33333 See added note on my previous posting about printing out results at each step. Re: Need storage space for 2k, 4min footage using JOption Programming Software Development by abbyo Thank you so much, Norm! I changed everything to float ('cept for the percentage portion) and I'm almost there... the result is correct, now I'm on to my 'storage space needed for project' ultimate result. Thanks so much!!!:) [CODE] import javax.swing.*; public class storageSP { public static void main(String[] args) { //declare … Re: about JOPTION . .how to disable [NO and CANCEL] Programming Software Development by cale.macdonald Do some reading on [URL="http://download.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html"]JOptionPane[/URL]. The answers are in that article. Next time post your code in code blocks. Help!! Does this correct? Programming Software Development by java-clueless …amount = prodTotalInventory * restockFee:// multiply numbers // display result in a JOption message dialog JOption.pane.showMessageDialog( null, “The amount is” * amount, “Amount …of two integers” , JOption.Pane.PLAIN_MESSAGE ); } end method main } end class GUI //Call invSort… Save data from array to file Programming by tawanprp … = new ObjectOutputStream(fos); fos.close(); oos.close(); } catch (FileNotFoundException e) { //joption needed JOptionPane.showMessageDialog(null, "Sorry File not found"… JOptionPane problem Programming Software Development by infinitus … enter word, and when you click on Tryletter button this JOption pops out asking you to enter word again, and its… and i can start playing ? Also when i put this JOption so its global, then i have bunch of errors on… javacode Programming Software Development by alanso … i just use the normal display when i do the joption there alot of error can anyone help thanks. package javaapplication1… Re: javacode Programming Software Development by alanso i meant now i am using the normal display because i am using scanner rite.....i want dialog box using joption but when i change that...there are syntax error.... Pls Help JAVA Program Headaches Not Giving me the right output for user input Programming Software Development by KCC1982 … the largest and smallest value that the user entered (using joption pane) with no if statements. I also have to modify…