Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Applet GUI Question

Options
  • 08-03-2006 4:02pm
    #1
    Closed Accounts Posts: 32


    i want to do something like this but dont even know if its possible...

    appletgui7yj.th.jpg

    basically have a window that has multiple swing objects and a graphics area.

    the buttons and mouse cant manipulate the grahpics/whiteboard area.

    any help if possible would be great

    thnx


Comments

  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    It's possible - jpanels, jbuttons, etc. Disabling the mouse on the graphics area may be awkward though - I've always just wanted things to work , never to not woirk :-)


  • Closed Accounts Posts: 32 VanStrummer


    cheers mate


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    You can display the image in a JLabel.The rest you can stick on jpanels (JTextArea, JLabels, JButtons) . For your scenario the gridlayout manager should work just fine, 2 rows and 2 columns.check out the java api's.Best of luck!
    Shamrock


  • Registered Users Posts: 3,299 ✭✭✭irishguy


    would recomend using netbeans , its free easy to use and has a very handy GUI builder


  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    Or Eclipse - it does everythign NetBeans does and then some. And it's hugely extensible with gazillions of plugins available all over the place.

    And I'm trying to start a religious war :-)


  • Advertisement
  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    Or Eclipse - it does everythign NetBeans does and then some. And it's hugely extensible with gazillions of plugins available all over the place.

    And I'm trying to start a religious war :-)


  • Registered Users Posts: 3,299 ✭✭✭irishguy


    bpmurray wrote:
    Or Eclipse - it does everythign NetBeans does and then some. And it's hugely extensible with gazillions of plugins available all over the place.

    And I'm trying to start a religious war :-)

    I know i am going to get slated for this but i think eclipse sux. Had loads of problems installing it with the visual editor, it also gave me old errors on lines that i have changed/deleted and i didnt find it that user friendly. I think the visual editor with netbeans is allot better/easier to use.

    I must say eclipse is very versatile and has loads of plugins, but netbeans rules :D

    Let the flame war begin


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    irishguy wrote:
    I know i am going to get slated for this but i think eclipse sux. Had loads of problems installing it with the visual editor, it also gave me old errors on lines that i have changed/deleted and i didnt find it that user friendly. I think the visual editor with netbeans is allot better/easier to use.

    I must say eclipse is very versatile and has loads of plugins, but netbeans rules :D

    Let the flame war begin
    Personally, I'd sooner slate you for using the "word" "sux".

    I do agree though that Eclipse visual editors pale behind the might that is (evidently - I've only seen it, never used it) Matiesse.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Get SWT designer if your going to do gui in eclipse.

    As for the OP. You could create a JFrame, then put a JPanel on it and set the layout to grid layout of it to 2 per row then place your items down. For the last bit (the buttons) you would create a new JPanel and layout the buttons on that and then put the Jpanel on.

    You could use a Gui editor but tbh it is easier to just type it out.


  • Registered Users Posts: 885 ✭✭✭clearz


    bpmurray wrote:
    Or Eclipse - it does everythign NetBeans does and then some. And it's hugely extensible with gazillions of plugins available all over the place.

    And I'm trying to start a religious war :-)

    And that is excactly why it sucks. I dont want gazillions of plugins or all the other crap that is piled ontop of these IDE's. Saying that an IDE is better because it has more features is excactly why I wouldnt use one. My ideal IDE would have the following features.

    Syntax Highlighting
    A keyboard shortcut to compile and run
    Line Numbering
    A GUI Designer (problem here is you only get this with the bloatware IDE's out there)

    no more or no less.


  • Advertisement
  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    EMACS!

    *hides*

    On a serious note, when designing Java interfaces, it may be an idea to steer clear of the visual designers. They don't speed you up that much, and some of them use absolute positioning, which will mess you up if the user uses a different platform/font/JVM/phase of moon.


  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    Yeah, you're dead right: the visual designers are pretty dreadful. The truth is that by trying to be all things, they don't do anything really well.


  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    clearz wrote:
    And that is excactly why it sucks. I dont want gazillions of plugins or all the other crap that is piled ontop of these IDE's. Saying that an IDE is better because it has more features is excactly why I wouldnt use one. My ideal IDE would have the following features.

    Syntax Highlighting
    A keyboard shortcut to compile and run
    Line Numbering
    A GUI Designer (problem here is you only get this with the bloatware IDE's out there)

    no more or no less.

    Hmm. Clearly you have no idea what Eclipse is. The plugins provide optional extended functionality, such as UML designers, test environments for J2ME devices, etc. These are things you don't normally encounter in most dev environments. They are not required.

    And the JVE provides a Swing/AWT/SWT GUI designer, complete with data bindings. Of course, in common with all other GUI designers, it's designed with a particular modus operandi in mind, which isn't always the best.

    Of course, the other side of Eclipse, its platform presence as the RCP, means that once you know how it ticks, it's almost trivial to create extensions that are actual applications, and not mere extensions to an IDE.

    Good reasons why it's now the dev environment of choice for non-MS development by quite a long way, so popular in fact that it's driven Borland out of the IDE market.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    clearz wrote:
    And that is excactly why it sucks. I dont want gazillions of plugins or all the other crap that is piled ontop of these IDE's.

    Then don't install them. All plugins are totally optional and barebones Eclipse is very lightweight.
    Syntax Highlighting
    A keyboard shortcut to compile and run
    Line Numbering
    A GUI Designer (problem here is you only get this with the bloatware IDE's out there)

    no more or no less.

    Has all that however some other important things that Eclipse has that every IDE has to have.

    Automatic imports
    Smart fill (ctrl space will do this)
    a Debugger
    Auto format to a coding format set out for your team.
    Unit Testing built in.
    declaration and reference finder as well as ability to jump to code of selected object.

    Oh and while its not needed the Auto-source feature is the win. Ever tried to write a bean by hand, after you have used the auto generate getters/setters option you won't again. Likewise with autowrap with try/catch.

    I get the impression you don't use Eclipse at all.


  • Registered Users Posts: 4,188 ✭✭✭pH


    Eclispse was the winner for a while (well actually it wasn't! - IDEA was always the winner by quite a way), and netbeans (3 & 4) lagged well behind.

    Netbeans as of version 5.0, is now as good as eclispe in most areas and exceeds it in others.

    But because comfort and familiarity you're never going to get an eclipse user to start using netbeans and say "wow", and vice versa.

    smart code-completion, Swing form design, brilliant cvs integration, easy J2EE integration, automatic error highligting in the source, auto java-docs, integrated ant etc etc.

    If there is are any differences between eclipse and netbeans these days they are minor and more to do with style and approach. Neither ide is anywhere near 'suxxing'


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Prehaps the ide vs ide should be stripped out to another thread. pH whats netbeans like for J2EE?


Advertisement