Netbeans, java3d, menubar, toolbar, jpanel  HELP

I'm attempting to make an application using netbeans which features a menu, a toolbar, and a jpanel beneath that which displays a Canvas3D. I got this to partially work, but the Canvas3D will not automatically resize. If I .add the canvas3D to the frame, then it resizes automatically but it writes over the toolbar (but not the jmenu since I made it inherit jpopupmenu).
Does anyone know of some good information for how to get 3D to work with a Java application? I don't even care if its Java3D...JOGL...any of the 3D libraries out there would be fine, I just need it to cooperate nicely with a GUI toolkit!
thanks for any info!!
-Zom

Hello, I am fighting with the netbeans platform + java3d as well and I am seeing the same problems as you have reported.
Are you using the netbeans RCP framework ?, if this is the case, could you
send me an email: [email protected]
Thanks a lot in advance!

Similar Messages

  • Can't Attach Files in 10.9 Mail via Menubar/Toolbar

    All of a sudden I cannot attach files in Mail via menu commands.  A selection (finder) window opens but all items are grayed out (no matter what location).  I can still attach files by dragging them from the Desktop (or other location) into the body of the email.
    Isolation:
    -Issue persists in Safari when logging into webmail.
    --Choosing to "attach" a file to an email (new composure or reply) from the webmail attach links brings up a Finder window with all content grayed out.
    -Created test admin user.
    --logged in as new user.
    --set up Mail w/ an email account.
    --attempted file attachment from menubar/toolbar icons.
    --works.
    ***issue is user specific.
    Resolution:
    -Access primary user ~/Library/Preferences/.
    --locate files named "com.apple.finder" .plist (may have multiple files w/ additional characters).
    --select all and move to Trash.
    --Restart.
    -log in and test.

    E. Van Meter wrote:
    Recently installed OX X 10.5 Leopard and ever since, I can't attach files to outgoing Gmail emails.
    I've tried in Safari, Camino and Firefox -- no luck.
    It does work if I switch to the "older version" of Gmail.
    Does anybody know if there's a setting I can change so I can use Gmail normally but be able to add attachments to mail?
    Anybody else having this issue?
    Your profile indicates you are running a very old version of Leopard which might explain the issue.
    Update to 10.5.8 using the combo update (not the auto software update) and see if that fixes your problem.

  • How To Disable IE  Menubar,Toolbar,AddressBar?

    Hi Gurus,
    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="Javascript">
    function compact(url)
    var win=window.open(url,'COMPACT','WIDTH=1000,HEIGHT=700,LOCATION=no,MENUBAR=no,TOOLBAR=no,STATUS=no,SCROLLBAR=no,RESIZABLE=no);
    window.opener = null
    window.close()
    return false
    win.focus();
    </SCRIPT>
    </HEAD>
    <BODY OnLoad="compact('http://server:port/forms/frmservlet?&separateframe=false&imageBase=codebase&WIDTH=1050&splashScreen=false&colorscheme=blue&lookandfeel=oracle')">
    </BODY>
    </HTML>
    using this coding i just removed the ie menubar ,toolbar as well as address bar.
    but i want to disable all.pls address this..
    Regards
    Gopinath M

    ya Wesley ,i tried but my customer want to one window at a time.
    using that java script i can show one window but the IE is not positioned.
    how can i set the x , y position of IE else if i disable the toolbar,menubar
    that window automatically positioned.at the meanwhile the user should not close the windows closed like ''x'' .it will ask the message like do u want to exit?.
    these are my requirement kindly address the same .
    Regards
    Gopinath M

  • Downloaded your updated version and I now can't access my audio program and I want to get rid of my Yahoo toolbar. HELP?

    downloaded your updated version and I now can't access my audio program (Windows Media Player) and I want to get rid of my Yahoo toolbar. HELP?

    Go to Tools | Add-ons | Extensions, find the Yahoo Toolbar and click Remove ;)

  • JPanel help

    hey,
    I'm making a calculator program with a function graphing part using JFrame and JPanel. But these two have been causing problems because when I run the GraphMain class, only a portion of the graph shows up. I have tested the Main and Graph classes and they work but the problem is the GraphMain class. Could somebody please help. here are the three classes:
    import java.util.Scanner;
    import java.util.ArrayList;
    //"Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction"
    //NEED TO HANDLE NEGATIVE NUMBERS AND DIFFERENCE BETWEEN MINUS
    //RECURSIVE SOLVE DOESN'T WORK FOR INPUT WITH TWO SET PARENTHESIS EX. (1+56)(3/8)
    public class Main
         public static ArrayList<Character> symbols;
         public static double lastAnswer;
         public static boolean radians;
         public static void main(String[] args)
              //initialize recognized symbols
              symbols = new ArrayList<Character>();
              symbols.add('+');
              symbols.add('~');
              symbols.add('*');
              symbols.add('/');
              symbols.add('%');
              symbols.add('^');
              symbols.add('s');
              symbols.add('c');
              symbols.add('t');
              symbols.add('l');
              radians = true;
              Scanner in = new Scanner(System.in);
              System.out.println("CALCULATOR (h for help)");
              System.out.println("NOTE: ~ represents minus, - represents negative");
              String input = "";
              input = clearWhitespace(in.nextLine());
              while (!input.equalsIgnoreCase("q"))
                   if (input.equalsIgnoreCase("graph"))
                        System.out.println("Opening function graphing window...");
                   if (input.equalsIgnoreCase("h"))
                        System.out.println("\nVARIABLES");
                        System.out.println("ans = last answer");
                        System.out.println("@ = pi = 3.14...");
                        System.out.println("# = e = 2.718...");
                        System.out.println("\nKEYS");
                        System.out.println("h = help");
                        System.out.println("q = quit");
                        System.out.println("* = multiply");
                        System.out.println("~ = subtract");
                        System.out.println("+ = add");
                        System.out.println("/ = divide");
                        System.out.println("% = modulus");
                        System.out.println("sin = sine");
                        System.out.println("cos = cosine");
                        System.out.println("tan = tangent");
                        System.out.println("csc = cosecant");
                        System.out.println("sec = cosecant");
                        System.out.println("cot = cotangent");
                        System.out.println("asin = sine inverse");
                        System.out.println("acos = cosine inverse");
                        System.out.println("atan = tangent inverse");
                        System.out.println("acsc = cosecant inverse");
                        System.out.println("asec = cosecant inverse");
                        System.out.println("acot = cotangent inverse");
                        System.out.println("log = logarithm");
                        System.out.println("ln = natural logarithm");
                        System.out.println("() = solve first");
                        System.out.println("ENTER = solve");
                        System.out.println("\nFUNCTIONS");
                        System.out.println("checkDiagnostics");
                        System.out.println("enableRadians");
                        System.out.println("enableDegrees\n");
                   else if (diagnostics(input) != null)
                        System.out.println(diagnostics(input));
                   else if (!input.equals(""))
                        try
                             System.out.println("= " + solve(replaceVariables(input)));
                        catch (IllegalArgumentException ex)
                             System.out.println(ex.getMessage());
                   input = clearWhitespace(in.nextLine());
              /*String blah = "(415(645(2762+4)2524)4256465)";
              String la = blah.substring(findParenthesis(blah)[0], findParenthesis(blah)[1]);
              System.out.println(la);*/
              /*String gah = "2+7*356*7+6+23*34";
              gah = multiplyDivide(gah);
              gah = addSubtract(gah);
              System.out.println(gah);*/
              /*int i = 1;
              System.out.println(findNums(gah, i)[0]);
              System.out.println(findNums(gah, i)[1]);
              System.out.println(gah.substring(findNums(gah, i)[0], i));
              System.out.println(gah.substring(i + 1, findNums(gah, i)[1]));*/
              /*String foo = "2^2";
              foo = exponents(foo);
              System.out.println(foo);*/
              /*String boo = "2sin~";
              boo = replaceVariables(boo);
              boo = trigonometry(boo);
              System.out.println(boo);*/
              /*String lala = "2546(23(4)2)24562";
              System.out.println(lala.substring(findParenthesis(lala)[0] + 1, findParenthesis(lala)[1]));
              System.out.println(lala.substring(0, findParenthesis(lala)[0]));*/
              /*int q = 1000000;
              double[] ys = new double[q];
              for (int i = 1; i < q; i++)
                   ys[i] = Double.parseDouble(solve("sin(" + i + ")^(cos" + i + ")"));
              System.out.println("DONE");*/
              //about 41 seconds
              //System.out.println(solveFunctionOfX("x^2", 3));
         public static String solve(String theInput) throws IllegalArgumentException
              String input = theInput;
              int first = 0, last = 0;
              try
                   first = findParenthesis(input)[0];
                   last = findParenthesis(input)[1];
              catch (IllegalArgumentException ex)
                   throw ex;
              String replace = "";
              String temp = "";
              while (first != -1 && last != -1)
                   replace = solve(input.substring(first + 1, last));
                   temp = "";
                   if (first != 0)
                        temp += input.substring(0, first);
                   if (first - 1 >= 0 && Character.isDigit(input.charAt(first - 1)))
                        temp += "*";
                   temp += replace;
                   if (last + 1 < input.length() && (Character.isDigit(input.charAt(last + 1)) || input.charAt(last + 1) == '-'))
                        temp += "*";
                   if (last != input.length() - 1)
                        temp += input.substring(last + 1, input.length());
                   input = temp;
                   first = findParenthesis(input)[0];
                   last = findParenthesis(input)[1];
              try
                   input = fourLetterFunctions(input);
                   input = threeLetterFunctions(input);
                   input = twoLetterFunctions(input);
                   input = exponents(input);
                   input = multiplyDivide(input);
                   input = addSubtract(input);
                   lastAnswer = Double.parseDouble(input);
              catch (IllegalArgumentException ex)
                   throw ex;
              return input;
         public static double solveFunctionOfX(String input, double x)
              String solveFunction = "", solution = "";
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == 'x')
                        solveFunction += x;
                   else
                        solveFunction += input.charAt(i);
              try
                   solution = solve(solveFunction);
              catch (IllegalArgumentException ex)
                   return 0;
              return Double.parseDouble(solution);
         public static String clearWhitespace(String input)
              String result = "";
              for (int i = 0; i < input.length(); i++)
                   if (!Character.isWhitespace(input.charAt(i)))
                        result += input.substring(i, i+1);
              return result;
         public static int[] findParenthesis(String input)
              int count = 0;
              int first = -1, last = -1;
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == '(')
                        if (count == 0)
                             first = i;
                        count++;
                   else if (input.charAt(i) == ')')
                        count--;
                        if (count == 0)
                             last = i;
              if (count > 0)
                   throw new IllegalArgumentException("Missing Right Parenthesis");
              else if (count < 0)
                   throw new IllegalArgumentException("Missing Left Parenthesis");
              return new int[]{first, last};
         public static String addSubtract(String theInput)
              int j, k;
              double a, b, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == '+' || input.charAt(i) == '~')
                        j = findNums(input, i)[0];
                        k = findNums(input, i)[1];
                        b = Double.parseDouble(input.substring(i + 1, k));
                        if (i == 0)
                             if (input.charAt(i) == '+')
                                  solution = lastAnswer + b;
                             else if (input.charAt(i) == '~')
                                  solution = lastAnswer - b;
                        else
                             a = Double.parseDouble(input.substring(j, i));
                             if (input.charAt(i) == '+')
                                  solution = a + b;
                             else if (input.charAt(i) == '~')
                                  solution = a - b;
                        if (i != 0)
                             temp = input.substring(0, j);
                        temp += solution + input.substring(k, input.length());
                        input = temp;
                        i = 0;
              return input;
         public static String multiplyDivide(String theInput)
              int j, k;
              double a = 0, b = 0, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == '*' || input.charAt(i) == '/' || input.charAt(i) == '%')
                        j = findNums(input, i)[0];
                        k = findNums(input, i)[1];
                        b = Double.parseDouble(input.substring(i + 1, k));
                        if (i == 0)
                             if (input.charAt(i) == '*')
                                  solution = lastAnswer * b;
                             else if (input.charAt(i) == '/')
                                  if (b == 0)
                                       throw new IllegalArgumentException("Divide by Zero Error");
                                  solution = lastAnswer / b;
                             else if (input.charAt(i) == '%')
                                  solution = lastAnswer % b;
                        else
                             a = Double.parseDouble(input.substring(j, i));
                             if (input.charAt(i) == '*')
                                  solution = a * b;
                             else if (input.charAt(i) == '/')
                                  if (b == 0)
                                       throw new IllegalArgumentException("Divide by Zero Error");
                                  solution = a / b;
                             else if (input.charAt(i) == '%')
                                  solution = a % b;
                        if (i != 0)
                             temp = input.substring(0, j);
                        temp += solution + input.substring(k, input.length());
                        input = temp;
                        i = 0;
              return input;
         public static String exponents(String theInput)
              int j, k;
              double a, b, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == '^')
                        j = findNums(input, i)[0];
                        k = findNums(input, i)[1];
                        b = Double.parseDouble(input.substring(i + 1, k));
                        if (i == 0)
                             if (input.charAt(i) == '^')
                                  solution = Math.pow(lastAnswer, b);
                        else
                             a = Double.parseDouble(input.substring(j, i));
                             if (input.charAt(i) == '^')
                                  solution = Math.pow(a, b);
                        if (i != 0)
                             temp = input.substring(0, j);
                        temp += solution + input.substring(k, input.length());
                        input = temp;
                        i = 0;
              return input;
         public static String fourLetterFunctions(String theInput)
              int  k;
              double b, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length() - 4; i++)
                   if (input.substring(i, i + 4).equals("asin") || input.substring(i, i + 4).equals("acos") || input.substring(i, i + 4).equals("atan") || input.substring(i, i + 4).equals("acsc") || input.substring(i, i + 4).equals("asec") || input.substring(i, i + 4).equals("acot"))
                        k = findNums(input, i + 3)[1];
                        b = Double.parseDouble(input.substring(i + 4, k));
                        //System.out.println(b);
                        if (input.substring(i, i + 4).equals("asin"))
                             if (Math.abs(b) > 1)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = (radians? Math.asin(b) : Math.asin(b) * 180 / Math.PI);
                        else if (input.substring(i, i + 4).equals("acos"))
                             if (Math.abs(b) > 1)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = (radians? Math.acos(b) : Math.acos(b) * 180 / Math.PI);
                        else if (input.substring(i, i + 4).equals("atan"))
                             solution = (radians? Math.atan(b) : Math.atan(b) * 180 / Math.PI);
                        else if (input.substring(i, i + 4).equals("acsc"))
                             if (Math.abs(b) < 1)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = (radians? Math.asin(1 / b) : Math.asin(1 / b) * 180 / Math.PI);
                        else if (input.substring(i, i + 4).equals("asec"))
                             if (Math.abs(b) < 1)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = (radians? Math.acos(1 / b) : Math.acos(1 / b) * 180 / Math.PI);
                        else if (input.substring(i, i + 4).equals("acot"))
                             solution = 1 / (radians? Math.atan(1 / b) : Math.atan(1 / b) * 180 / Math.PI);
                        //System.out.println(solution);
                        if (i != 0)
                             temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += solution;
                        temp += input.substring(k, input.length());
                        input = temp;
                        //System.out.println(temp);
                        i = 0;
              return input;
         public static String threeLetterFunctions(String theInput)
              int  k;
              double b, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length() - 3; i++)
                   if (input.substring(i, i + 3).equals("sin") || input.substring(i, i + 3).equals("cos") || input.substring(i, i + 3).equals("tan") || input.substring(i, i + 3).equals("log") || input.substring(i, i + 3).equals("csc") || input.substring(i, i + 3).equals("sec") || input.substring(i, i + 3).equals("cot"))
                        k = findNums(input, i + 2)[1];
                        b = Double.parseDouble(input.substring(i + 3, k));
                        //System.out.println(b);
                        if (input.substring(i, i + 3).equals("sin"))
                             solution = Math.sin((radians? b : b * 180 / Math.PI));
                        else if (input.substring(i, i + 3).equals("cos"))
                             solution = Math.cos((radians? b : b * 180 / Math.PI));
                        else if (input.substring(i, i + 3).equals("tan"))
                             if ((b + Math.PI / 2) % Math.PI == 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = Math.tan((radians? b : b * 180 / Math.PI));
                        else if (input.substring(i, i + 3).equals("log"))
                             if (b <= 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = Math.log10(b);
                        if (input.substring(i, i + 3).equals("csc"))
                             if (b % Math.PI == 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = 1 / Math.sin((radians? b : b * 180 / Math.PI));
                        else if (input.substring(i, i + 3).equals("sec"))
                             if ((b + Math.PI / 2) % Math.PI == 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = 1 / Math.cos((radians? b : b * 180 / Math.PI));
                        else if (input.substring(i, i + 3).equals("cot"))
                             if (b % Math.PI == 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = 1 / Math.tan((radians? b : b * 180 / Math.PI));
                        //System.out.println(solution);
                        if (i != 0)
                             temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += solution;
                        temp += input.substring(k, input.length());
                        input = temp;
                        //System.out.println(temp);
                        i = 0;
              return input;
         public static String twoLetterFunctions(String theInput)
              int  k;
              double b, solution = 0;
              String temp = "", input = theInput;
              for (int i = 0; i < input.length() - 2; i++)
                   if (input.substring(i, i + 2).equals("ln"))
                        k = findNums(input, i + 1)[1];
                        b = Double.parseDouble(input.substring(i + 2, k));
                        //System.out.println(b);
                        if (input.substring(i, i + 2).equals("ln"))
                             if (b <= 0)
                                  throw new IllegalArgumentException("Out of Domain");
                             solution = Math.log(b);
                        //System.out.println(solution);
                        if (i != 0)
                             temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += solution;
                        temp += input.substring(k, input.length());
                        input = temp;
                        //System.out.println(temp);
                        i = 0;
              return input;
         public static String replaceVariables(String theInput)
              String input = theInput;
              String temp = "";
              for (int i = 0; i < input.length(); i++)
                   if (input.charAt(i) == '#')
                        temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += Math.E;
                        if (i != input.length() - 1 && (Character.isDigit(input.charAt(i + 1)) || input.charAt(i + 1) == '-'))
                             temp += "*";
                        temp += input.substring(i+1, input.length());
                        input = temp;
                   else if (input.charAt(i) == '@')
                        temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += Math.PI;
                        if (i != input.length() - 1 && (Character.isDigit(input.charAt(i + 1)) || input.charAt(i + 1) == '-'))
                             temp += "*";
                        temp += input.substring(i+1, input.length());
                        input = temp;
                   else if (i < input.length() - 2 && input.substring(i, i + 3).equals("ans"))
                        temp = input.substring(0, i);
                        if (i != 0 && Character.isDigit(input.charAt(i - 1)))
                             temp += "*";
                        temp += lastAnswer;
                        if (i != input.length() - 3 && (Character.isDigit(input.charAt(i + 3)) || input.charAt(i + 3) == '-'))
                             temp += "*";
                        temp += input.substring(i+3, input.length());
                        input = temp;
              return input;
         public static int[] findNums(String input, int charPos)
              int k = charPos - 1, j = charPos + 1;
              while (k > 0 && (Character.isDigit(input.charAt(k - 1)) || input.charAt(k - 1) == 'E' || input.charAt(k - 1) == '.' || input.charAt(k - 1) == '-'))
                   k--;
              while(j < input.length() && (Character.isDigit(input.charAt(j)) || input.charAt(j) == 'E' || input.charAt(j) == '.' || input.charAt(j) == '-'))
                   j++;
              return new int[]{k,j};
         public static String diagnostics(String input)
              if (input.equals("checkDiagnostics"))
                   return "" + (radians? "radians":"degrees");
              else if (input.equalsIgnoreCase("radians?"))
                   return "" + radians;
              else if (input.equalsIgnoreCase("enabledegrees"))
                   radians = false;
                   return "done";
              else if (input.equalsIgnoreCase("enableradians"))
                   radians = true;
                   return "done";
              else
                   return null;
    import java.awt.Color;
    import java.awt.Graphics;
    public class Graph
         public Graph(int axMin, int axMax, int ayMin, int ayMax, int aappletSize)
              /*xSize = x;
              ySize = y;*/
              xMin = axMin;
              xMax = axMax;
              yMin = ayMin;
              yMax = ayMax;
              appletSize = aappletSize;
              xScaling = (double) appletSize/(Math.abs(xMin) + Math.abs(xMax));
              yScaling = (double) appletSize/(Math.abs(yMin) + Math.abs(yMax));
              //System.out.println(xScaling);
              //System.out.println(yScaling);
              rectCenterX = (xMin + xMax )/ 2;
              rectCenterY = (yMin + yMax) / 2;
              //System.out.println(rectCenterX);
              //System.out.println(rectCenterY);
              appletCenterX = (int)((appletSize / 2) - (rectCenterX * xScaling));
              appletCenterY = (int)((appletSize / 2) - (rectCenterY * yScaling));
              //System.out.println(appletCenterX);
              //System.out.println(appletCenterY);
              functions = new String[10];
              functionsBoolean = new boolean[10];
              functionSolutions = new double[10][appletSize];
              functionAppletSolutions = new int[10][appletSize];
              axis = true;
         public void drawGraph(Graphics g)
              drawAxis(g);
              drawFunctions(g);
         public void setFunction(int num, String function)
              functions[num] = function;
              solveFunctions(num);
         public void enableDisableFunction(int function, boolean state)
              functionsBoolean[function] = state;
         private void drawFunctions(Graphics g)
              for (int i = 0; i < 10; i++)
                   if (functionsBoolean)
                        g.setColor(colors[i]);
                        for (int j = 0; j < appletSize - 1; j++)
                             if ((functionAppletSolutions[i][j + 1] > 0 && functionAppletSolutions[i][j + 1] < appletSize) || (functionAppletSolutions[i][j] > 0 && functionAppletSolutions[i][j] < appletSize))
                                  g.drawLine(j, functionAppletSolutions[i][j], j + 1, functionAppletSolutions[i][j + 1]);
         private void solveFunctions(int i)
              for (int j = 0; j < appletSize; j++)
                   //System.out.println(convertToRectangular(j,0)[0]);
                   //System.out.println(functions.get(i));
                   //System.out.println(Main.solveFunctionOfX(functions.get(i), convertToRectangular(j,0)[0]));
                   functionSolutions[i][j] = Main.solveFunctionOfX(functions[i], convertToRectangular(j,0)[0]);
                   functionAppletSolutions[i][j] = convertToApplet(0, functionSolutions[i][j])[1];
         private double[] convertToRectangular(int appletX, int appletY)
              double newX = 0, newY = 0;
              newX = (double) ((appletX - appletCenterX) / xScaling);
              newY = (double) ((appletY - appletCenterY) / yScaling);
              return new double[]{newX, newY};
         private int[] convertToApplet(double x, double y)
              int newX = 0, newY = 0;
              newX = (int) (x * xScaling) + appletCenterX;
              newY = (int) (-y * yScaling) + appletCenterY;
              return new int[]{newX, newY};
         private void drawAxis(Graphics g)
              if (axis)
                   g.setColor(Color.black);
                   //x-axis
                   g.drawLine(0, appletCenterY, appletSize, appletCenterY);
                   //y-axis
                   g.drawLine(appletCenterX, 0, appletCenterX, appletSize);
         public void printSolutions(int functionNumber)
              for (int i = 0; i < appletSize; i++)
                   System.out.println(convertToRectangular(i,0)[0] + " | " + functionSolutions[functionNumber][i]);
         public void printAppletSolutions(int functionNumber)
              for (int i = 0; i < appletSize; i++)
                   System.out.println(i + " | " + functionAppletSolutions[functionNumber][i]);
         public void printFunctionsBoolean()
              for (int i = 0; i < functionsBoolean.length; i++)
                   System.out.println(i + " | " + functionsBoolean[i]);
         private boolean axis;
         private String[] functions;
         private double[][] functionSolutions;
         private int[][] functionAppletSolutions;
         private boolean[] functionsBoolean;
         private int xMin;
         private int xMax;
         private int yMin;
         private int yMax;
         private int appletSize;
         private double rectCenterX;
         private double rectCenterY;
         private int appletCenterX;
         private int appletCenterY;
         private double xScaling;
         private double yScaling;
         private static Color[] colors = new Color[]{Color.blue, Color.cyan, Color.green, Color.magenta, Color.orange, Color.pink, Color.red, Color.yellow, Color.gray, Color.darkGray};
    import java.awt.Container;
    import java.awt.Graphics;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JCheckBoxMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JOptionPane;
    public class GraphMain implements ActionListener, ItemListener
         public JMenuBar createJMenuBar()
              JMenuBar menuBar = new JMenuBar();
              JMenu fileMenu = new JMenu("File");
              menuBar.add(fileMenu);
              JMenuItem exit = new JMenuItem("Exit");
              exit.addActionListener(this);
              fileMenu.add(exit);
              JMenu functionMenu = new JMenu("Function");
              menuBar.add(functionMenu);
              JMenu function1 = new JMenu("function 1");
              JMenuItem edit1 = new JMenuItem("edit 1");
              JCheckBoxMenuItem enable1 = new JCheckBoxMenuItem("enable 1");
              edit1.addActionListener(this);
              enable1.addItemListener(this);
              function1.add(edit1);
              function1.add(enable1);
              functionMenu.add(function1);
              JMenu function2 = new JMenu("function 2");
              JMenuItem edit2 = new JMenuItem("edit 2");
              JCheckBoxMenuItem enable2 = new JCheckBoxMenuItem("enable 2");
              edit2.addActionListener(this);
              enable2.addItemListener(this);
              function2.add(edit2);
              function2.add(enable2);
              functionMenu.add(function2);
              JMenu function3 = new JMenu("function 3");
              JMenuItem edit3 = new JMenuItem("edit 3");
              JCheckBoxMenuItem enable3 = new JCheckBoxMenuItem("enable 3");
              edit3.addActionListener(this);
              enable3.addItemListener(this);
              function3.add(edit3);
              function3.add(enable3);
              functionMenu.add(function3);
              JMenu function4 = new JMenu("function 4");
              JMenuItem edit4 = new JMenuItem("edit 4");
              JCheckBoxMenuItem enable4 = new JCheckBoxMenuItem("enable 4");
              edit4.addActionListener(this);
              enable4.addItemListener(this);
              function4.add(edit4);
              function4.add(enable4);
              functionMenu.add(function4);
              JMenu function5 = new JMenu("function 5");
              JMenuItem edit5 = new JMenuItem("edit 5");
              JCheckBoxMenuItem enable5 = new JCheckBoxMenuItem("enable 5");
              edit5.addActionListener(this);
              enable5.addItemListener(this);
              function5.add(edit5);
              function5.add(enable5);
              functionMenu.add(function5);
              JMenu function6 = new JMenu("function 6");
              JMenuItem edit6 = new JMenuItem("edit 6");
              JCheckBoxMenuItem enable6 = new JCheckBoxMenuItem("enable 6");
              edit6.addActionListener(this);
              enable6.addItemListener(this);
              function6.add(edit6);
              function6.add(enable6);
              functionMenu.add(function6);
              JMenu function7 = new JMenu("function 7");
              JMenuItem edit7 = new JMenuItem("edit 7");
              JCheckBoxMenuItem enable7 = new JCheckBoxMenuItem("enable 7");
              edit7.addActionListener(this);
              enable7.addItemListener(this);
              function7.add(edit7);
              function7.add(enable7);
              functionMenu.add(function7);
              JMenu function8 = new JMenu("function 8");
              JMenuItem edit8 = new JMenuItem("edit 8");
              JCheckBoxMenuItem enable8 = new JCheckBoxMenuItem("enable 8");
              edit8.addActionListener(this);
              enable8.addItemListener(this);
              function8.add(edit8);
              function8.add(enable8);
              functionMenu.add(function8);
              JMenu function9 = new JMenu("function 9");
              JMenuItem edit9 = new JMenuItem("edit 9");
              JCheckBoxMenuItem enable9 = new JCheckBoxMenuItem("enable 9");
              edit9.addActionListener(this);
              enable9.addItemListener(this);
              function9.add(edit9);
              function9.add(enable9);
              functionMenu.add(function9);
              JMenu function10 = new JMenu("function 10");
              JMenuItem edit10 = new JMenuItem("edit 10");
              JCheckBoxMenuItem enable10 = new JCheckBoxMenuItem("enable 10");
              edit10.addActionListener(this);
              enable10.addItemListener(this);
              function10.add(edit10);
              function10.add(enable10);
              functionMenu.add(function10);
              return menuBar;
         public Container createContentPane()
              JPanel contentPane = new JPanel()
                   public void run()
                        while (true)
                             repaint();
                   public void paintComponent(Graphics g)
                        //System.out.println(getWidth());
                        //System.out.println(getHeight());
                        graph.drawGraph(g);
                        //graph.printAppletSolutions(0);
              contentPane.setOpaque(true);
              return contentPane;
         public void actionPerformed(ActionEvent e)
              JMenuItem source = (JMenuItem) (e.getSource());
              String what = source.getText();
              if (what.equals("Exit"))
                   quit();
              else if (what.equals("edit 1"))
                   graph.setFunction(0, JOptionPane.showInputDialog(null, "Enter function 1."));
              else if (what.equals("edit 2"))
                   graph.setFunction(1, JOptionPane.showInputDialog(null, "Enter function 2."));
              else if (what.equals("edit 3"))
                   graph.setFunction(2, JOptionPane.showInputDialog(null, "Enter function 3."));
              else if (what.equals("edit 4"))
                   graph.setFunction(3, JOptionPane.showInputDialog(null, "Enter function 4."));
              else if (what.equals("edit 5"))
                   graph.setFunction(4, JOptionPane.showInputDialog(null, "Enter function 5."));
              else if (what.equals("edit 6"))
                   graph.setFunction(5, JOptionPane.showInputDialog(null, "Enter function 6."));
              else if (what.equals("edit 7"))
                   graph.setFunction(6, JOptionPane.showInputDialog(null, "Enter function 7."));
              else if (what.equals("edit 8"))
                   graph.setFunction(7, JOptionPane.showInputDialog(null, "Enter function 8."));
              else if (what.equals("edit 9"))
                   graph.setFunction(8, JOptionPane.showInputDialog(null, "Enter function 9."));
              else if (what.equals("edit 10"))
                   graph.setFunction(9, JOptionPane.showInputDialog(null, "Enter function 10."));
         public void itemStateChanged(ItemEvent e)
              JCheckBoxMenuItem source = (JCheckBoxMenuItem)(e.getSource());
    String what = source.getText();
    if (what.equals("enable 1"))
                   graph.enableDisableFunction(0, source.getState());
              else if (what.equals("enable 2"))
                   graph.enableDisableFunction(1, source.getState());
              else if (what.equals("enable 3"))
                   graph.enableDisableFunction(2, source.getState());
              else if (what.equals("enable 4"))
                   graph.enableDisableFunction(3, source.getState());
              else if (what.equals("enable 5"))
                   graph.enableDisableFunction(4, source.getState());
              else if (what.equals("enable 6"))
                   graph.enableDisableFunction(5, source.getState());
              else if (what.equals("enable 7"))
                   graph.enableDisableFunction(6, source.getState());
              else if (what.equals("enable 8"))
                   graph.enableDisableFunction(7, source.getState());
              else if (what.equals("enable 9"))
                   graph.enableDisableFunction(8, source.getState());
              else if (what.equals("enable 10"))
                   graph.enableDisableFunction(9, source.getState());
         protected void quit()
              System.exit(0);
         private static void createAndShowGUI()
              JFrame frame = new JFrame("Graph");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              GraphMain main = new GraphMain();
              frame.setJMenuBar(main.createJMenuBar());
              frame.setContentPane(main.createContentPane());
              frame.setSize(408, 457);
              /*GraphComponent component = new GraphComponent();
              frame.add(component);*/
              frame.setVisible(true);
         public static void main(String[] args)
              /*for (int i = 1; i <= 10; i++)
                   System.out.println("JMenu function" + i + " = new JMenu(function " + i + ");\n" +
                             "JMenuItem edit" + i + " = new JMenuItem(edit " + i + ");\n" +
                                       "JCheckBoxMenuItem enable" + i + " = new JCheckBoxMenuItem(enable " + i + ");\n" +
                                                 "edit" + i + ".addActionListener(this);\n" +
                                                 "enable" + i + ".addItemListener(this);\n" +
                                                 "function" + i + ".add(edit" + i + ");\n" +
                                                 "function" + i + ".add(enable" + i + ");\n" +
                                                 "functionMenu.add(function" + i + ");\n");
              graph = new Graph(-10, 10, -10, 10, 400);
              graph.setFunction(0, "x");
              graph.setFunction(1, "x^2");
              graph.setFunction(2, "x^3");
              graph.setFunction(3, "x^4");
              graph.setFunction(4, "x^5");
              graph.setFunction(5, "x^6");
              graph.setFunction(6, "x^7");
              graph.s

    If only the x-positive part of graph is showing up, check the behaviour of Math.pow
    when the first argument is negative. (I know you are trying to raise numbers to a
    positive integral power, but I have no idea what happens further up when you
    parse the expression.)

  • I can't save bookmarks to my toolbar. Help Please

    I have a new Macbook Pro and when I migrated everything over, nothing moved with Firefox.
    I am now trying to add bookmarks to my toolbar and they are not being saved in the toolbar. I have closed and reopened Firefox, have the latest version and nothing is happening.
    When I Show all my bookmarks it shows them in a folder. When I try to re add them to the Toolbar, they will not stay.
    Please help and please dumb it down.

    It is possible that you do not have the "Bookmarks Toolbar items" on the Bookmarks Toolbar.
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible.
    *Firefox menu button > Options/Preferences
    *View > Toolbars (press F10 to display the hidden Menu bar)
    *Right-click empty toolbar area
    Use Toolbar Layout (Customize) to open the Customize window and set which toolbar items to display.
    *check that "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    *if "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette into the Customize window to the Bookmarks Toolbar
    *if missing items are in the toolbar palette then drag them back from the Customize window on the toolbar
    *if you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar setup
    *https://support.mozilla.org/kb/How+to+customize+the+toolbar
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Firefox 5 on Win7: All my plugin buttons have gone from the toolbar. They are not in the customise pane. Session manager offers the correct sessions but opens with last session instead. I've re-installed % and reset toolbars. Help!

    Win 7
    Firefox 5
    Problem with high memory use.
    restarted
    Plugin buttons gone from toolbar/
    Missing plugins still show in plugin manager but buttons missing from toolbar add buttons pane.
    Tried reset toolbars - no difference.
    Tried re-instal of Firefox 5 - no difference except:
    Session manager offers correct session on startup but starts with last session

    In case you are using "Clear history when Firefox closes":
    *do not clear the Browsing History
    *Firefox > Preferences > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-browsing-search-and-download-history
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox profile folder that store session data.
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Multiple_profile_files_created
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).

  • Java3D SDN's HelloUniverse1 Help

    Hello, Im trying to learn Java3D, Im very new to Java as it is... im using SDN's HelloUniverse1 Example but am having real difficulties when trying to run it.
    Im getting this error:
    renderer.doWork(long) Line:776
    renderer(J3dThread).run() Line: 250
    Any ideas? (im using the eclipse IDE 3.2.0 with JRE System Library [J2SE1.5]j3dcore, j3dutils and vecmath)
    thanks in advance
    here is the code from HelloUniverse1
    * @(#)HelloUniverse1.java 1.55 02/10/21 13:43:36
    * Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions are met:
    *  - Redistributions of source code must retain the above copyright notice,
    * this list of conditions and the following disclaimer.
    *  - Redistribution in binary form must reproduce the above copyright notice,
    * this list of conditions and the following disclaimer in the documentation
    * and/or other materials provided with the distribution.
    * Neither the name of Sun Microsystems, Inc. or the names of contributors may
    * be used to endorse or promote products derived from this software without
    * specific prior written permission.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY
    * OF SUCH DAMAGES.
    * You acknowledge that Software is not designed,licensed or intended for use in
    * the design, construction, operation or maintenance of any nuclear facility.
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.GraphicsConfiguration;
    import javax.media.j3d.Alpha;
    import javax.media.j3d.BoundingSphere;
    import javax.media.j3d.BranchGroup;
    import javax.media.j3d.Canvas3D;
    import javax.media.j3d.RotationInterpolator;
    import javax.media.j3d.Transform3D;
    import javax.media.j3d.TransformGroup;
    import javax.vecmath.Point3d;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    public class HelloUniverse1 extends Applet {
      private SimpleUniverse u = null;
      public BranchGroup createSceneGraph() {
        // Create the root of the branch graph
        BranchGroup objRoot = new BranchGroup();
        // Create the TransformGroup node and initialize it to the
        // identity. Enable the TRANSFORM_WRITE capability so that
        // our behavior code can modify it at run time. Add it to
        // the root of the subgraph.
        TransformGroup objTrans = new TransformGroup();
        objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
        objRoot.addChild(objTrans);
        // Create a simple Shape3D node; add it to the scene graph.
        objTrans.addChild(new ColorCube(0.4));
        // Create a new Behavior object that will perform the
        // desired operation on the specified transform and add
        // it into the scene graph.
        Transform3D yAxis = new Transform3D();
        Alpha rotationAlpha = new Alpha(-1, 4000);
        RotationInterpolator rotator = new RotationInterpolator(rotationAlpha,
            objTrans, yAxis, 0.0f, (float) Math.PI * 2.0f);
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
            100.0);
        rotator.setSchedulingBounds(bounds);
        objRoot.addChild(rotator);
        // Have Java 3D perform optimizations on this scene graph.
        objRoot.compile();
        return objRoot;
      public HelloUniverse1() {
      public void init() {
        setLayout(new BorderLayout());
        GraphicsConfiguration config = SimpleUniverse
            .getPreferredConfiguration();
        Canvas3D c = new Canvas3D(config);
        add("Center", c);
        // Create a simple scene and attach it to the virtual universe
        BranchGroup scene = createSceneGraph();
        u = new SimpleUniverse(c);
        // This will move the ViewPlatform back a bit so the
        // objects in the scene can be viewed.
        u.getViewingPlatform().setNominalViewingTransform();
        u.addBranchGraph(scene);
      public void destroy() {
        u.cleanup();
      // The following allows HelloUniverse to be run as an application
      // as well as an applet
      public static void main(String[] args) {
        new MainFrame(new HelloUniverse1(), 256, 256);
    }

    Ok, point taken...
    where's a good place to learn "whats under the hood", most tutorials just say, "type into your command line: bla bla bla" without explaining why or what this includes when doing so or anything remotly interesting apart from what to type (not helpful when wanting to learn whats under the hood)
    TIA

  • Netbeans on Mac OS X help

    Hi guys, I currently have an odd problem. I am finally using Netbeans on my Mac. I currently use it on my Windows machine as well. On my Windows machine if gives you this option up by the toolbar to either have Design or Source showing. I mainly want to do this to do GUI design obviously. On my Mac however, it is not giving me these option up near the top and I looked all over to try and figure out. I have the project opened up as a Netbeans project and everything like it should be and still no luck. Any idea on how to see the current Design?
    Thanks,
    Derek

    Possibly, I dom't know how Apple implemented the Matisse details - it does support Matisse, right?. If the class will open as a GUI in NB's editor on Windows, bu not on the Mac, then I'd say that's the cause. Is that an error? Possibly, possibly not.

  • Importing Widget - Menubar 2.0 - Help!

    I went to widget browser, and to adobe exchange where I formatted Spry Horizontal MenuBar 2.0 exactly how I wanted it...saved it to my presets. (It showed up on the adobe exchange horizontally like I wanted it. Then I opened a page in dreamweaver CS5, chose insert > widget> my presets> and chose the formatted Horizontal MenuBar.  All the code for the widget was imported onto that page. I have two problems.
    1. It shows up vertically. How do I get it to show up horizontally?
    2. And was there a better way to import it so I do not have to have ALL the code on every page in my website. I am worried that it will hamper spiders.
    I thought it would go into the spry assets folder.  
    I have not cleaned up all the comments in the code yet. It is located here
    http://www.bountifulspinweave.com/alpine_meadow_yarn_starlight1.htm
    Thank you in advance for any insight you can provide.
    Sincerely, Lois

    Thank you for your help and for the additional websites to visit for help.Thanks to your input, I was able to build a new page and get the menubar to work and validate everything except for three min width errors in IE 6. I had 0px for the min width by default. I tried 0%, 0em and 2em but that did not help. So I will just put up with that error I guess.
    I am still unsure if all the code for the spry menubar 2.0 should be in the source code for every page and not in a separate file uploaded to the spry assets folder. I simply went to widget browser, to my presets, then inserted it on my page. Will all that code affect spiders cataloging my site?
    Thank you again!
    Sincerely, Lois

  • JScrollpane and JPanel help

    i have a panel which is bigger than the main window's size. i want to add it onto the ScrollPane. but the scrollbar is not working. how do i refresh the scrollbar so that the scrollbar comes when the JPanel is attached onto it.

    the full code is
    public EditorPanel(int flag,String title,EditorFrame ed)
    Toolkit tk=Toolkit.getDefaultToolkit();
    clipBoard=tk.getSystemClipboard();
    write = new JTextPane();
    fileFlag=flag;
    fileName=title;
    edf=ed;
    EditorKit editorKit = new StyledEditorKit()     
    public Document createDefaultDocument()     
    {return new ColorSyntax();
    searchIndex=0;
         // creating the toolbar          
         toolBar=new JToolBar();
         addButtons(toolBar);
         toolBar.setBorder(new SoftBevelBorder(BevelBorder.RAISED));
         toolBar.setFloatable(false);
         toolBar.setBounds(0, 0, 800, 20);
         write.setEditorKitForContentType("text/8085", editorKit);
         write.setContentType("text/8085");
         write.replaceSelection("");
         write.requestFocus();
         write.addKeyListener(this);
         write.registerKeyboardAction(edf.getUndoAction(),KeyStroke.getKeyStroke,KeyEvent.VK_Z,InputEvent.CTRL_MASK),JComponent.WHEN_IN_FOCUSED_WINDOW);
         write.registerKeyboardAction(edf.getRedoAction(),KeyStroke.getKeyStroke(KeyEvent.VK_Y,InputEvent.CTRL_MASK),JComponent.WHEN_IN_FOCUSED_WINDOW);
         Dimension d=tk.getScreenSize();
         StyledDocument styledDoc = write.getStyledDocument();
         AbstractDocument doc = (AbstractDocument)styledDoc;
         doc.addUndoableEditListener(new MyUndoableEditListener());
    //problem is here
         scrollpane = new JScrollPane(write);          
         scrollpane.setPreferredSize(new Dimension((2*d.width)/3 - 15,3*d.height/4));
         scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
         // making the object of the device panel to be added onto the device scroller
         devAddPanel =new DeviceAddPanel();
         deviceScrollpane = new JScrollPane();
         deviceScrollpane.setViewportView(devAddPanel);
         deviceScrollpane.setPreferredSize(new Dimension((d.width)/3 - 15,3*d.height/4));
         deviceScrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
         add(toolBar, BorderLayout.PAGE_START);
         //Create a split pane with the two scroll panes in it.
         splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,deviceScrollpane,scrollpane);
         splitPane.setOneTouchExpandable(true);
         splitPane.setDividerLocation(((d.width)/3)-5);
         splitPane.setContinuousLayout(true);
         splitPane.setDividerSize(15);
         add(splitPane, BorderLayout.CENTER);
    //problem ends here
    i am creating a split pane in which on the left i am adding the device panel which is giving the problem even though the panel is bigger that the scrollpane's size it is not showing the vertical scrollbar. the right side with the text area is working fine

  • JScrollPane containing JPanel HELP!

    Hi again,
    I'll try my luck again!
    Ok, I have a JPanel that uses a GridBagLayout with 3 columns and many rows. Each row is of the form:
    [JLabel][JTextField][JButton]
    Ok. Since I have many of these rows, and my application should be a constant size, I need to somehow make you able to scroll down the list of these labels,textfields and buttons - to the one you want. I have tried making the containing JPanel the viewport of a JScrollPane, however, when I only have a couple of rows of labels, textfields, and buttons, each expands to fit the viewport size - and they turn out looking really dumb.
    How can I get it so that the labels, textfields and buttons are only the height of the text in each?
    Please please, please, please help me.
    sincerely, Edd.

    Chenge the weight (x&y) in the GridBagConstraints of the components you don't want to expand to 0.0. Change the fill to GridBagConstraints.NONE.

  • JPanel help, i am so very noob

    hey, can someone help me with Jpanel, i want to make the JPanel like a gridlayout, does anyone know how? if not, can a Jframe have like a selfcontainedframe? (just wondering, i don't ecen know if that word exists, i know jpanel has a selfcontainedpanel or something)

    Maybe you want in Internal Frame:
    http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
    Take a look at the Table Of Contents from above. There is also a section on Layout Managers.

  • NetBeans Problem with package, pls help.....

    Hi all, I have a package problem. With the following 2 classes, I can compile fine in dos with
    c:\java> javac WapDev3\*.java
    but wont compile in Netbeans 3.4 Pls help.
    The classes are
    -------------------class sample1 at c:\java\WapDev3------------------
    package WapDev3;
    class sample1 {
    public sample1() {
    System.out.println("hi");
    --------------------class sample2 at c:\WapDev3------------------
    package WapDev3;
    class sample2 {
    public sample2() {
    public static void main(String[] args) {
    sample1 osample1 = new sample1();

    I don't know for certain whether this is causing your problem, but in Netbeans, the package structure is considered to be identical to the directory structure, relative to the mountingpoint, so if your files are in java/wapdev, Netbeans wants you to make the package java/wapdev.
    This can be cured by mounting a subdirectory, using a relative mounting point.
    In your case, you should mount C:\java (I assume you've mounted C:\).
    Good luck.

  • Deleted my favorites in the toolbar please help!

    Hello,
    My 3 year old deleted my favorites button in the tool bar.
    I think she held down the left mouse button and draged it out of the toolbar.
    Where did it all go to?
    Please help me.
    Thank you,
    JT

    Try View menu > show BookMarks Bar
    If no joy, choose View menu > Customize Toolbar and re-choose the default or set it manually to your liking.

Maybe you are looking for