java - Graphics and applets -


I am currently working on an assignment and need to create basic control (buttons) for Mandelbrot set, which JApplet . Graphics has been started in the init () method and a method that attracts Mandelbrot is called in start () . The problem is, I have searched high and low and can not understand how to add a GUI to your applet

  1. I do not explicitly add Mandelbrot to JPNL, and ..
  2. I have no space left because it seems to add a GUI because Mandelbrot has taken up the entire JFrame .

    I had an idea which was to set the size of the JFrame , set the Mandelbrot graphic size to say only 4/5 of the whole frame, and Can add buttons to the rest?

    Is it like a good solution?

    Is this sound like a good solution?

    No panel in which Mandelbrot has been drawn, should return a sensible favorite shape. Add rendering panels and buttons to groups of layouts or layouts using layout padding, borders and button margins for white space.

    But I am still a little confused in relation to tagging the body of the question, both refer to japlate and (twice) JFrame .

    • An applet has to do with the size provided by HTML (or JS, in the case of deployment toolkit scripts) which launches it
    • One frame Call the properly kept UI and expect the minimum size required to display the components.

      General Tips
      1. Why is the code an applet? If this is due to the imagination by the teacher, please see them
      2. To deploy the Java desktop app, the best option is to usually install the app. Using the JWS allows the user to launch a JFrame link from a link in a web page.
      3. The Java GUI may have to work on multiple platforms, at different screen resolutions; Using different PLAFs, such as they are not conducive to the exact location of components, use layout managers to organize components for a strong GUI, or with 1 layout padding; Limitations for 2




Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -