Best GUI development practices.

Hello,
I have been playing around with Swing components and designing smaller projects. Recently, I started working on a fantasy football manager program. I sent it to a friend, and he runs a different resolution than I do. Many of my buttons and things weren't showing up on his screen. This is not what I was expecting.
How do I manage to keep everything looking right no matter what the resolution? I want my components to be laid out the same way on a 800x600 screen as on a 1920x1080 screen. I want to be able to see all of the components. I want the components to shrink, stay-readable, and fit on the screen.
My idea so far is to take in the users resolution in the beginning and then adjust all of the components sizes and positions to a percentage of the available resolution.
Am I going at this wrong? Is this already somehow implemented and I'm just missing it?

supermancc0386 wrote:
My idea so far is to take in the users resolution in the beginning and then adjust all of the components sizes and positions to a percentage of the available resolution.
Am I going at this wrong? Is this already somehow implemented and I'm just missing it?Yes, you're going about it wrong. Read this: [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html]. You should never manually assign sizes and locations for components, for the reasons you've already witnessed, plus more (e.g. localization, though that may not be a concern for our particular case).
Anyway, the learning curve for layout managers is pretty steep, but it's well worth the effort. Then your GUI will look right no matter how the user resizes the window. You can also post here with questions when you're having trouble with a particular layout (being sure to include an SSCCE).
Good luck!

Similar Messages

  • Best APEX developing practices?

    Hello,
    I have a simple question - What are the best APEX developing practices in regards to developing workspaces ?
    There are two ways to develop in APEX (when you create an application for internal use, of cause) :
    One is to have a workspace per Application - Meaning that you have Developing, Test and Production Application in the same Workspace, and this Workspace would be reserved to one application only. The advantage of this approach is that it is easy to move ready pages (or even the whole application) from Developing to Production - You can simply copy ready pages from one application to another.
    The other one is to have a Workspace per Environment - Meaning that you have all your Production applications in one Workspace and all the Development application in another Workspace. In this case, when you have to move a page to Production, you have to export it, and import it to another Workspace. The advantage of this approach is security - you don't work in production...
    So I wanted to ask APEX gurus - What is your opinion on that? Are there any Oracle standards for developing in APEX? What is your best working experience in regards to developing applications in APEX, etc..??
    Thank you!

    Hi Sloger
    Keep it simple DEV, TEST and PROD are on separate database instances, preferably on separate servers.
    If you only have one box, then develop your app on your PC using XE.
    You can have the same workspace id on multiple databases, allowing you to promote between databases easily using SQL*Plus.
    As far as on app per workspace, that's entirely up to you.
    Multiple applications in a single workspace work very well - after all this is how the APEX team builds the Application Builder.
    Regards
    Mark
    demo: http://apex.oracle.com/pls/otn/f?p=200801 |
    blog: http://oracleinsights.blogspot.com |
    book: https://www.packtpub.com/oracle-application-express-4-0-with-ext-js/book

  • NetBeans or Eclipse: Which is better for GUI development ?

    I am relatively new with JAVA, came from embedded software domain mostly in C.
    My interest is to learn and develop the GUI applications using Swing.
    I am currently in a process of evaluating the IDEs, Eclipse and NetBeans on Linux desktop environment (SuSE 10.3).
    My primary findings found that, NetBeans is better equipped with GUI development while Eclipse needs to have a plugin installed.
    For GUI development, I found that few of my fellow Java developer friends have mixed feelings about these two wonderful IDEs, in summary here are the comments:
    1) Developing GUI is better without any assistance from built in designers of IDEs (e.g. NetBeans or Visual Swing of Eclipse). Because, they put extra 'garbage" codes which are very much IDE specific.
    2) GUI development in NetBeans is faster and more productive than Eclipse
    3) Visual Swing for Eclipse is not a matured product and it is far inferior than NetBeans' capabaility
    Now I ask a question, what is the best practice to adopt for starting the GUI development ? NetBeans or Eclispse or IDE-less development ?
    Thanks.

    atomodachi wrote:
    Now I ask a question, what is the best practice to adopt for starting the GUI development ?
    NetBeansThis is my preference for IDE's. Please note that as I stated that is my preference. There isn't any best, some are clearly better than others for one reason or another, but once again, that boils down to personal preference.
    EclispseNot my preference.
    IDE-less development ?IMO: that is just silly. Unless you just enjoy tons of typing; why would you ever embark on doing something without a tool to speed up the process. Now that is not to say that in using your IDE you should start out by just dragging and dropping up a storm and merrily running down the road in ignorance until you hit a rough spot and have things dramatically pointed out that you've really not a clue about what is happening. Use the IDE, but learn how to do the manual processes along with it. That means that sometimes you'll not drag and drop to build your GUI, you'll actually code the entire thing. And you really should learn to do things command-line like compile. Do yourself a really big favor too, learn the debugger. The integrated debuggers is, perhaps, one of the best inventions in productivity tools that has as of yet been invented for developers.
    In any case, have fun... choose what you like, it really does come down to personal preference. I've worked in several shops over the years and most have come to the conclusion that if you can get the work done, and have projects that others can use, then to each their own preferences. The discussion rages on for and against each of the systems that you have mention--each have valid arguments--it boils down to what do you want and like.

  • GUI Development Paradigm

    Hi everybody!
    I'm quite new in ALBPM and I have some questions about it, especially about user interfaces.
    I've been developing JSP aplications (using MVC frameworks) for a long time, and I can't figure out how does it fit in the ALBPM world.
    What's the paradigm for GUI development? At first, I believe the screenflow should act like the controler, the BPM object is the model, and the custom JSPs are the views.
    But... sincerely for me, the Screenflow/BPM object/Custom JSPs seem less flexible than a regular MVC (Struts, JSF, ...)
    My question is: Is it mandatory to use screenflows, or I'm able to use a MVC architecture inside ALBPM? If it's possible how should I implement it?
    For example: I have a custom JSP with some menu items, and this items are links to other JSP pages. This behaviour should
    be modeled using screenflows or can I use another approach? What's the best practice for this task?
    In MVC architecture, the menu will be inside an html form with an action pointing to a servlet (a controller). And what about screenflows?
    Well, I'd like to hear some opinions about this, especially because i'm triyng to get used to BPM paradigm, and in my opinion the best approach for this is hearing from people who had experienced this situation.
    Thanks in advance,
    Thiago

    Hi Thiago,
    I think I see what you're asking. Let me know if I'm missing your point.
    I personally try to have a Model version of the BPM Object. I'll build this object first. This object just has the attributes, groups and methods I need. This object will be used to pass information from the process into the individual screenflows and procedures and subprocesses.
    I'll then create a View version of the same BPM Object. I create this View BPM object is created by creating an heir from the original Model BPM Object (right mouse click the Model BPM Object and click "Create Heir"). When I know I'll need to collect several Model BPM Objects into one View object, I'll instead add these as attributes (each attribute would be of the type of the desired Model BPM Object). Built this way, this View Object would have all the attributes and methods of the Model object. You'd also add to this View Object the presentations you'll later use inside the screenflows and any methods you'll use inside these presentations.
    At this point, you'll have a clean Model BPM Object - uncluttererd by presentations and presentation methods. You'll have View BPM Objects that will be used exclusively inside Global, Interactive, Global Creation and Interactive activity screenflows.
    When I create a screenflow I always do it after I first have created a process with a BPM Object as an instance variable already defined in it. This object does not have to be perfectly defined. It just should be present in the process. If I decide later that I need additional attributes and methods, these can be added at any point in the development lifecycle. This object is the Model object I'll pass to my screenflows.
    Second, after creating this process with the BPM Object (usually the process at this stage just shows the "Happy Path") I'll add the necessary Interactive activities used in the process. (finally getting to your question) I then create screenflows for each of the Interactive activities (right click the activity -> Main task -> pick screenflow from the dropdown -> New). As you're doing this from this panel, be sure to map the Model object as both an incoming and outgoing variable into and out of the screenflow. Some people also map the "result" predefined variable as an outgoing variable from the screenflow. If you do it this way, you'll not have to do any of the 4 argument mappings you'd have to do had you added the incoming and outgoing variables manually. If you decide to do this manually, many times you'll find yourself spending an hour tracing down where you lost the contents / changes made inside screenflows.
    This best practice makes it easy to pass in and get back the Model object to and from the screenflow. Once inside the screenflow, you'd do the Model to View to Model object mapping described in my earlier post.
    hth,
    Dan

  • GUI Development Question

    Hi everybody!
    I'm quite new in ALBPM and I have some questions about it, especially about user interfaces.
    I've been developing JSP aplications (using MVC frameworks) for a long time, and I can't figure out how does it fit in the ALBPM world.
    What's the paradigm for GUI development? At first, I believe the screenflow should act like the controler, the BPM object is the model, and the custom JSPs are the views.
    But... sincerely for me, the Screenflow/BPM object/Custom JSPs seem less flexible than a regular MVC (Struts, JSF, ...)
    My question is: Is it mandatory to use screenflows, or I'm able to use a MVC architecture inside ALBPM? If it's possible how should I implement it?
    For example: I have a custom JSP with some menu items, and this items are links to other JSP pages. This behaviour should
    be modeled using screenflows or can I use another approach? What's the best practice for this task?
    In MVC architecture, the menu will be inside an html form with an action pointing to a servlet (a controller). And what about screenflows?
    Well, I'd like to hear some opinions about this, especially because i'm triyng to get used to BPM paradigm, and in my opinion the best approach for this is hearing from people who had experienced this situation.
    Thanks in advance

    The reason for this is due to our JVM. This application is being developed for an embedded system. There are no swing components in this JVM environment for a couple reasons: size constraints and possible license issues.

  • Online place for EP Development Practice

    Hi All,
    Is there any Online place for EP Development Practice?
    Regards,
    Ganga

    Hi Ganga,
    The best option would be to download the [Trial version |http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/50c58b14-da6d-2a10-ca94-a3c0937828d6] and start exploring the Portal features. You can also go through the [help|help.sap.com] and lots of other training materials/ articles available on SDN
    @Prasanna,
    RAC is meant for ISVs and I don't think it is for individiuals to evaluate any ECC or Netweaver component.
    Regards,
    Nikhil

  • What was the first GUI development tool of Oracle?

    Hi,
    I am an Oracle Developer and currently developing my own Website dedicated to Oracle, especially on the development tools. In my website I have a page dedicated to the history and development of the Oracle Developer tools, from SQL*FORMS 1,2,3,4 etc. to the Current Developer. What I want to know are the release dates of the first Windows based development tools by Oracle. I know that Forms 4 was the first Windows based GUI development tool Oracle released ( I think it was called Oracle CDE). But I don't know when it was released. Was it in 1993 or 1994? If you can tell me which month it would be even better and more accurate. I got to know through the Internet that Developer/2000 Version 1 was released in March/1995. Is this true? Any information on this would be greatly appreciated.
    Thanks & regards
    LS

    Hi,
    the first version of CE was 7.1. Followed by 7.11 and 7.20. But you have to be carefull. There was a netweaver release 7.0 which already included parts of the components shipped with CE (e.g CAF and WebDynpro). But these are different releases, so it is not possible to do an easy upgrade from NW 7.0 to CE 7.1
    Best regards,Stefan

  • Which PL/SQL developer tool is best to develop the PL/SQL program?

    Hi, all, who know which PL/SQL developer tool is best to develop the PL/SQL program? it is jdeveloper or designer or third party developer tool? please let me know, Thanks!

    To be honest , I have been using only Notepad or
    a simple Textpad ..to this date.
    While these tools may be of help in indenting and beautification of code, I feel you lose your debugging skills and forget the SQL-PL/SQL syntax with them.
    Cheers
    Ashwin N.

  • Web Service Best and Worst Practices within Oracle SOA Suite

    Hi All,
    Has anybody got a single document that concisely details the best and worst practices around the design of web services for oracle SOA and BPEL.
    I'm interested the following aspects
    1. Level of Granularity
    2. Level of Reuse
    3. BPEL orchestration. numbers of BPEL process vs services
    4. Transport choices...SOAP vs REST vs Big Services etc
    5. Activity Monitoring with BAM
    6. Future proofing of signatures and ongoing maintenance and process change
    I'm constructing a document myself to share on this forum, but i'd be very interested to use the wisdom of others if somebody has done this before...
    Thanks in advance :)

    This is a question best answered by your Oracle reseller or Oracle account manager to give you all the details but I hope this brief answer helps:
    - The Unified Business Process Management Suite (BPM Suite 11g) includes: BPM Studio, BPM Composer, BPMN Service Engine and Workflow Extensions, BPM Process Spaces, and BPM Process Analytics.
    - BPM Suite 11g requires the licensing of SOA Suite 11g for Oracle Middleware which requires a license for WebLogic Suite.
    - You can license SOA Suite 11g now and license BPM Suite 11g later.
    Since the products are layered, I don't see this cutting into SOA sales at all. My personal view is that BPM on top of SOA is brilliant since it provides easy integration between human and automated tasks, builds on many of the SOA concepts that are key for a successful BPM implementation (functional, not the Oracle product), and uses the same IDE. The synergies extend past easy use of services; the same business rules and human workflow components are used between both products.

  • Which tool is the best to develop stored procedure?

    Hello everyone,
    which tool is the best to develop and debug stored procedure in oracle9i/10g?
    Thanks

    > Now i am using sqlplus to develop procedures. But I can not debug them.
    How do you debug??
    Bad programmers tend to need and use a debugger a lot.
    I learned to program back when you were only allowed 3 compiles and link due to mainframe CPU costs. The 3rd build was the production one. If you could not cut it, you could not become a Programmer. (back then it still carried a lot of meaning and yes, people spoke of Programmers using capitals)
    If you need to debug your code regularly, then you have a more serious problem. A problem of not writing PROPER MODULARISED code. A problem of not tackling programming problems LOGICALLY - by reducing the complex problem into a set of smaller problems and solving each of those in turn.
    Having to trace code step by step, insert break points, and all that... Debugging must be an exception. If it is not, you must seriously consider your programming techniques and better your design skills. Get back to programming 101 fundamentals.

  • Introducing JavaStates - a new API for state based GUI development in Swing

    JavaStates partially implements the semantics of D Harel' statecharts.
    It is currently hosted as source forge project:
    [https://sourceforge.net/projects/javastates/]
    , and has been used for several years for teaching Java Swing and the specification of man machine interfaces at ESIL
    [http://www.esil.univmed.fr]
    [http://laurent.henocque.com]
    The project provides several demos, including a full fledged swing text editor, and is stable.
    Details can be found here too:
    [http://javastates.posterous.com/]
    I'd be very happy to interact with both experts and users.
    I claim that Javastates tremendously improve the quality and speed of GUI development.
    Do you agree?
    Edited by: lhenocque on Mar 4, 2010 4:18 AM

    Thanks for the good practise hint, and many more thanks for your interest.
    I haven't tried anything but don't you get an explosion of states?
    explosion of states is controlled by concurrent regions. Two states in two concurrent regions can be active at the same time.
    There can be no 'explosion' anyway since the states are programmer declared. The list is finite, and under control.
    For example the program I'm working on has a table and actions are enabled based on:
    -no selection/single selection/multi selection
    -top/bottom row selected (move up/down action)
    -user read/write permission
    -properties of the object of the selected row
    The situation you describe is handled by (at least) four concurrent regions.
    The typical error is usually forgetting a particular one which result in action being enabled/disabled when the shouldn't. Currently solving that by having a callback method which enables all the action correctly and gets called whenever there is a selection/security/etc update.
    Javastates cares for both setting the properties of the states (including the callbacks to fire) and for the cleanup. Using this allows for defect free interfaces in the sense that nothing can be left over.
    Using Javastates helps you to separate your logic in the same way as object programming with virtual functions does. You should end up replacing a code with many if/thens by separate listeners, dynamically set by callbacks.
    Also fluent interface method chaining is nice until it becomes a flood in my opinion - similar to how GroupLayout is better handled by Matisse GUI builder than by hand, JavaStates might benefit more from a graphical tool.
    You are right. Both apis exist. The fluent api is provided for simplicity, since it prevents from declaring useless local variables.
    Also for a GUI builder. I created the foundation of Javastates for an interpreted language called WIZ in the IDE Openside around 1990 (that was in C).
    Then later I implemented a subset of the current Java features in C++, that were interfaced in the GUI Builder called ILOG Views.
    So yes I agree a GUI can help, but anyway the Java code resulting from using states is mare more concise and structured than it would otherwise.

  • JSE 8 - Tutorials covering GUI development?

    The version 7 tutorial doesn't match up - is there any good tutorial documentation covering GUI development with JSE 8 ?
    thanks!

    The tutorial from Netbeans 4.1 should fit - http://www.netbeans.org/kb/41/form_getstart.html

  • IDE for gui development

    Does any one know a good ide for java gui development other than JBuilder...
    thanks
    SP

    I use both JBuilder and Eclipse, but to be honest, I never created a GUI with any of them. In my experience, at least some GUI-creators produce a lot of junk - the GUIs always looked different during runtime than they did in the editor window. Do it like I do and manually code them.

  • GUI development direction

    I am trying to get a feel for where Sun is heading with GUI development tools. The visu tool (XDesigner) included with Forte C++ installs with "support" for integrating a numer of widget sets into the base program. However, I have never been able to create a fully functional widget set-specific version of the visu tool with the supplied integration files. The CDE widgets can be integrated somewhat successfully, but other user_widgets directories like that for Motif 2.0 are missing files, and it's clear that these were never tested before pressing the CDs. Without these additional widgets (combo boxes, tabbed panes,...), it's not possible to create a reasonably modern GUI. These problems are not addressed with each new release or update, which indicates that it must not be a priority for Sun or other developers. I've asked about this on various tech support calls to Sun, but no one had information. Does anyone have any clues to Sun's direction regarding modern GUI development with C++?

    Motif 2.x development is not supported in Forte Developer 6U2 and previous versions.
    It will be supported in Forte Developer 7 though.
    You can try out the FD7EA2 package with your code for now, but FD7EA2 does not honor the "visu" name and "VISUROOT" environment variable. You will have to change "visu" to "xdesigner" in any existing makefiles and "VISUROOT" to "XDROOT". Other than that it should be compatible.
    FD7EA2 is available at http://wwws.sun.com/software/Developer-products/info/features/fd7ea2.html .
    -Moazam

  • Tools for GUI development in Java

    hi,
    Can anybody tell me which r the tools available for GUI development using java?which could be the best

    Take care not to produce much source code! Use a suitable framework rather than a tool and save maintainability. E.g. http://www.must.de/cameleon.html

Maybe you are looking for

  • ABAP Report HR module :

    Hi , I  have to  make  report  for  all  employee's  attendance details  based  on  this structure as mentioned below  for a month  or specific  duration period. Empcode   Empname   Empdesig  1stday               2ndday........................ absent

  • Installing problems on new MacBook Pro

    Lightroom 5 and Company of heroes (mac) both failed to install, I tried to install canon utilities but I think it is not yet mav'ed up. Any suggestions?.

  • Download and installing oracle odbc driver alone

    Hi all, I wanted to find out if I can download just the oracle odbc driver and install in without actually installing oracle database or client version on windows PC. thank you

  • Grouping by a single column of select statement to set status

    Hi, I need a help in getting the o/p in a single SQL statement. I have the below scenario: Part_No Event Indic     --Status A     E1     X      A     E2     Y      A     E3     N     --Null B     C1     Y      B     C2     Y B     C3     Y     --List

  • Migration pre-requisites for GR\IR clearing..

    Hi All, My client wants to migrate the data in production after upgrading the EHP5, the pre-requisites to data migration GR\IR ACCOUNT SHOULD BE ZERO. In production they have open Purchase orders, its not possible to close the Pos. I am thinking to p