Design advice for setting users default time

I have an application that in a number of different places requires that records when being updated or created are shown to default to the user's current date. Depending on the location of the user, this could be a different day than where the server is.
All of the relevant fields in the database tables are using a datatype of "TIMESTAMP WITH TIMEZONE". When a users account is initially created, the timezone that the user is in is saved. When the user logs on, an "alter session set time_zone" command runs on the database to change the time zone of the current session.
When a user updates or creates a record and one of the field(s) requires to display the current date of the user, I call a ViewObject which runs a query to "select current_timestamp from dual" to return the current date from the database and populate the field with this.
I've realised that I'm creating a considerable overhead as this view object may be queried dozens of times during a users session and was thinking of running it once when the user logs on and storing the "USER_DATE" as a session variable - then I can simply refer to this each time, instead of many round-trips off to the database. Obviously there is a risk if the user logs on just before midnight and stays on until after that the date will be incorrect but this is extremely unlikely as the application is only used during normal business hours up to 9pm as an exception
Am I heading down the right track here or doing something daft (and missing something far more simple that I should be doing !)
Cheers,
Brent

Hi Frank,
Thanks for that - after 8 years of working with Oracle Forms and afterwards the same again with ADF, I still find it hard sometimes when using ADF to understand the best approach to a particular problem - there is so many different ways of doing things/where to put the code/how to call it etc... ! Things seemed so much simplier back in the Forms days !
Chandra - thanks for the information but this doesn't suit my requirements - I originally went down that path thinking/expecting it to be the holy grail but ran into all sorts of problems as it means that the dates are always being converted into users timezone regardless of whether or not they are creating the transaction or viewing an earlier one. I need the correct "date" to be stored in the database when a user creates/updates a record (for example in California) and this needs to be preserved for other users in different timezones. For example, when a management user in London views that record, the date has got to remain the date that the user entered, and not what the date was in London at the time (eg user entered 14th Feb (23:00) - when London user views it, it must still say 14th Feb even though it was the 15th in London at the time). Global settings like you are using in the adf-config file made this difficult. This is why I went back to stripping all timezone settings back out of the ADF application and relied on database session timezones instead - and when displaying a default date to the user, use the timestamp from the database to ensure the users "date" is displayed.
Cheers,
Brent

Similar Messages

  • How do i set a default time of 2.0 seconds for all transitions in iMovie 10.  Please help.,

    how do i set a default time of 2.0 seconds for all transitions in iMovie 10.  Please help.,

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    If you do not keep changes after a restart then see:
    *http://kb.mozillazine.org/Preferences_not_saved
    *https://support.mozilla.org/kb/Preferences+are+not+saved

  • How do I set the default time for calendar alerts?

    How do I set the default time for calendar alerts? I always want to have an alert 15 minutes before my appointments. I don't want to have to manually set it each time I make an appointment (I just moved to iphone from a windows mobile where this was basic stuff so I apologise if this is a noob question).

    I have the same issue. I've searched these forums and found lots of people who have asked this same question, but nobody who has received an answer.
    About a year ago, I migrated from a Windows PC and a Blackberry (both of which had very simple default alert options) to a MacBook Pro and an iPhone and have yet to find a solution on this forum or from any of my Apple-savvy friends. Very discouraging.

  • How to Set Automatic Default Time in Calendar

    Friends,
    When I create new event in calendar (by double clicking on a specific date) for example Group Dinner, the calendar autotatically set the start time at 8PM.
    How to set the default time to 7PM for example.
    Thanks
    Regards,
    akostaman

    Ok It seems not just a problem of 24 hour time appointments that won't sync but all appointments I make on my iphone in calendar won't sync to calendar on my mac?

  • Time-series / temporal database - design advice for DWH/OLAP???

    I am in front of task to design some DWH as effectively as it can be - for time series data analysis - are there some special design advices or best practices available? Or can the ordinary DWH/OLAP design concepts be used? I ask this - because I have seen the term 'time series database' in academia literature (but without further references) and also - I have heard the term 'temporal database' (as far as I have heard - it is not just a matter for logging of data changes etc.)
    So - it would be very nice if some can give me some hints about this type design problems?

    Hi Frank,
    Thanks for that - after 8 years of working with Oracle Forms and afterwards the same again with ADF, I still find it hard sometimes when using ADF to understand the best approach to a particular problem - there is so many different ways of doing things/where to put the code/how to call it etc... ! Things seemed so much simplier back in the Forms days !
    Chandra - thanks for the information but this doesn't suit my requirements - I originally went down that path thinking/expecting it to be the holy grail but ran into all sorts of problems as it means that the dates are always being converted into users timezone regardless of whether or not they are creating the transaction or viewing an earlier one. I need the correct "date" to be stored in the database when a user creates/updates a record (for example in California) and this needs to be preserved for other users in different timezones. For example, when a management user in London views that record, the date has got to remain the date that the user entered, and not what the date was in London at the time (eg user entered 14th Feb (23:00) - when London user views it, it must still say 14th Feb even though it was the 15th in London at the time). Global settings like you are using in the adf-config file made this difficult. This is why I went back to stripping all timezone settings back out of the ADF application and relied on database session timezones instead - and when displaying a default date to the user, use the timestamp from the database to ensure the users "date" is displayed.
    Cheers,
    Brent

  • Java EE design advice for a re-designed DB app

    I'm currently tasked with rewriting a legacy DB app in Java. The original was written in Delphi. It worked great for a number of years, but the powers that be have recently decided to redesign and rewrite it in Java. Basically I just have the same set of business requirements as the original did.
    Overall, the app is a desktop GUI application that helps track contents of a natural history museum collection. The collection contains a bunch of specimens (dead animals) collected all over the globe at various times over the last 200 years. Multiple users (1 - 10 uesrs) will have to have access to the data at the same time. I also have to provide a nice Swing GUI for it.
    Here's my question: Is this the type of app that lends itself to a Java EE design? I'm imagining using a Java EE app server that connects to the DB. The app server would provide DB access, producing entity beans, as well as managing a number of session beans (EJBs) that implement the business logic (security, user management/session management). I would also have a Swing GUI that would connect to the beans remotely. This sounds like it would help me keep a good disconnect between the UI layer (Swing), the business logic (EJBs), and the data layer (entity beans accessed using the Java Persistance API). Does this sound reasonable? I'm a veteran Swing developer, but not a seasoned Java EE developer/designer.
    Also, if I use this architecture, I can imagine one issue that I might run into (I'm sure there are many others). I can imagine that I would want to retrieve the entity beans (lets say mypackage.MyPersonBean) through some call to an EJB, and then use the bean in some rendered Swing component. What happens when the Swing component needs to access the results of MyPersonBean.getAddresses() if the addresses are lazy loaded?
    As you can probably tell, I really have more than one design question here. Help/comments about any of this is greatly appreciated.

    I was thinking the same thing, but don't have a
    successful experience to validate my gut feelings.
    Here's my only suggestion (which dubwai could
    hopefully confirm or correct): write your entity
    classes/data model classes with no knowledge of
    lazy-loading etc. Then subclass them, overriding
    just the getChildren() type of methods and build the
    lazy-loading knowledge into the subclass.More or less, yes. Don't over-think it, though. If you define your basic data 'types' as interfaces, you don't need to get into complex type hierarchies or multiple versions of the types unless that becomes necessary and if it does, the changes should not affect the presentation layer.
    Since you are on-board with this and I think you are completely following, there is a technique for the lazy loading that you can use here.
    In the case where it's a one-to-one relationship, you can do the lazy-loading by creating a simple wrapper class for the child object. This class will have a reference to either null or a filled in Object. This is a little more OO because the Object is taking care of itself. Whether this abstraction is useful to you, you will have to decide.
    In the case of a one-to-many relationship, you can create a custom Collection (List or Set) that manages the stub loading. If you make a generic abstract version and subclass it for the different child types, you might be able to reuse a lot of the data retrieval code. You can do the same thing with the wrapper too.
    I will caution you to try to keep it as simple as you can without painting yourself into a corner. Only do things that you are going to use now and write things so they can be expanded upon later. Reducing coupling is a core technique for that.
    When the
    GUI asks for an object in the getData() call, hand
    them a subclass object, but don't let them know it.
    In other words, have the method "public DataClass
    getData()" return a SubDataClass object. The caller
    will only know that they received a DataClass
    object, but lazy-loading awareness will be built
    into it. This way, the lazy-loading stuff is
    completely transparent to the caller but you still
    have simple data classes that can be used outside of
    a lazy-loading context.Yes this is the idea, but don't write the other versions until you need them.
    It's also possible to use
    this method if you need to add transparent
    lazy-loading to classes that you aren't the author
    of. (Only classes that have been tagged 'final' or
    have 'final' public methods would be beyond this
    method's reach.)Yes, you can use the wrapper approach above but if the author of that class made a lot of unecessary assumptions you might have trouble.
    This approach allows for some enhancements, too.You
    can create a thread that retrieves the children of
    Foo (e.g. bars) incrementally after the Foo is
    returned to the caller. Often you can load the
    bars
    in the time it takes the user to click around to
    the
    point where they are needed or at least be partly
    done. This will make the app seem very fast to the
    user because they get the Foo very quickly (because
    you didn't load the chidren) and then the bars
    really
    quickly (because you loaded them during user
    'think-time').
    I love this idea. I'm hoping to code this into my
    GUI app soon.I would advise that you get the main lazy-loading working without this (keep in mind when writing the code) and do it once you are sure you will finish on time.

  • How to set user defaults in GRC 10.0

    Dear Experts,
    we are trying to maintain the user default parameters for access request, so that the user default parameters can be provisioned with the access request.
    we've found the note 1615552, but when we following the guide and copy the BRF Function id (80E0ED08B0561DDFA5ADCADA787E1EDA) of "User Defaults" to BRFplus->open object, it shows always "Not a valid BRFplus ID" .
    Can someone advice, how can I find out the right BRFplus ID for user default function or I have to create it by myself??
    Thanks a lot!
    Best Regards,
    Ying

    Hi Ying,
    You have to create first the applications, Functions and rules etc in TA: brfplus and the the Application ID of the function has to be associated to the application id i.e. user defaults and MSMP workflow in the customizing activity:-
    Governance, Risk and Compliance->Access Control->Maintain AC Applications and BRFplus Function Mapping
    I hope this clarifies your doubt.
    Best regards,
    Jatin

  • Design advice for custom painting

    Hi,
    Can someone give me some high-level design advice on designing a JPanel subclass for custom painting? My panel class is becoming very complex, with lots of drawing and scaling methods, so I'm wondering if I could abstract away some of these graphical elements by creating new classes to make the design more object-oriented. However, I'm finding that there are also disadvantages in representing some of my graphic components as classes. Specifically,
    1. It will lead to a much higher level of class coupling. My panel will depend on all these new classes to work correctly. In fact the situation is even worse because my panel is an inner class and, to do some of the scaling, needs to use methods from an object stored in the parent class. I would therefore have to also pass this object reference as an argument to many of these new classes.
    2. It will lead to a lot of awkward passing of data between classes. For example, I need to use g2.drawImage(img, x, y, w, h, this), so I will have to pass not only the graphics context but also the panel reference itself.
    Is it common for panel subclasses that do custom painting to be complex?
    thanks,
    Eric

    I wrote the map view for a commercial GIS system. Drawing and scaling on a JPanel is challenging, but it need not be complex.
    1. To eliminate class coupling, you need to create a couple of interfaces: Renderable (what you want drawn) and Renderer (the thing doing the low-level drawing). Renderer will have before and after setup and reset methods (to do things like scaling and rotation), and methods that the renderables can use to draw graphics. The Renderable interface can be as simple as a single method: draw(Renderer).
    Every type of graphic that you draw on the screen would be a different class that implements Renderable, and which knows how to draw itself using whatever lower-level drawing commands you put in the Renderer. If you construct each Renderable in terms of java.awt.Shape, then Renderable.draw() could call a method Renderer.draw(java.awt.Shape, java.awt.Color).
    2. The Panel becomes fairly simple. It has a Renderer and a collection of Renderable objects. Its paint() method calls the Renderer setup method, calls Renderable.draw(Renderer) on each object, and calls the Renderer reset method. Each Renderable in turn calls Renderable.draw(java.awt.Shape, java.awt.Color) one or more times.
    Renderer should get a Graphics2D from the Panel when the setup method is called. That's when the Renderer does all of the scaling, positioning, and rotation on the Graphics2D. The Renderable implementations shouldn't even need to know about it.
    I don't think custom painting code is necessarily complex, merely challenging to write. If you're only drawing a few lines and circles, you probably don't have to be too concerned about design elegance and code maintainability. The map view I designed for our GIS system, on the other hand, has to handle all kinds of map geometry, icons, text, and aerial photos.

  • Advice for setting access permissions

    Hi,
    I've changed my account to 'standard' and created a new admin account after reading here about security etc. Now I notice that other 'standard' users on the machine have read/write access to all my docs but I don't have access to theirs. I want to set permissions so that I have read/write access from my standard account and my admin account (as a safety measure) but that other standard users don't have access other than to my public folder.
    Any suggestions?
    Thanks
    Dual G5 2.5Ghz, Powerbook G4 1.33Ghz, iPod 40GB   Mac OS X (10.4.7)  

    I haven't been working on the machine much since, but
    needed to quickly do something (in a rush, and not
    paying attention) and moved everything back again. I
    now find I don't have permission to modify some of my
    own folders. I ran those Terminal commands you
    suggested and they now come up with a bunch of
    objections, saying they can't complete the command.
    It sounds like you have files/folders that are still owned by User A inside User B's home folder.
    You can restore all contents of a home folder to its respective owner by logging in as an administrator, and entering these commands into Terminal:
    sudo chown -R jim /Users/jim
    sudo chown -R bob /Users/bob
    etc.
    To cut through all this, would it be sensible for me
    to copy all my documents and apps to the external
    hard drive, delete the originals, create an entirely
    new user account both on my G5 and my Powerbook (I
    frequently share files between them, mounting them on
    each other's desktops, syncing, etc) with identical
    names, then copy the docs and apps over to the new
    users on each machine. Starting from scratch, as it
    were? Would this work?
    Putting documents onto an external drive is a good way to share them between user accounts. Right-click the drive, open the Get Info panel, and check the Ignore Ownership box. Then all user accounts can modify anything on the drive.
    The problem with keeping shared documents on the boot volume is that by default, newly created files are read-only for everybody except their creator. If User A creates a document and wants User B to be able to edit it, User A must change the permissions manually.
    Under Tiger, it's possible to use ACLs (Access Control Lists) to set up a shared folder in which all documents will be read-write for all users that you specify. This can be accomplished by:
    1) Logging in as an administrator
    2) Create a new folder in /Users/Shared, call it something like /Users/Shared/sharefolder
    3) Open Terminal
    4) enter sudo fsaclctl -p / -e
    5) paste all of this into Terminal at once, replacing USERNAME with the short user name of one of the users to be given access:
    sudo chmod +a "USERNAME allow delete,chown,list,search,add_file,\
    addsubdirectory,delete_child,file_inherit,directoryinherit" \
    /Users/Shared/sharefolder
    6) Repeat step 5, replacing USERNAME with another user's short user name
    7) COPY (NOT move) any existing files you want to share to /Users/Shared/sharefolder
    8) Delete the original files
    Now both users can edit anything in the sharefolder, and anything added to it in the future. Note that for the permissions settings to stick, files must either be newly created inside of it, or copied to it. Previously existing files that are moved to that location will retain their original permissions and not inherit the new ones.
    eMac   Mac OS X (10.4.7)  
    eMac   Mac OS X (10.4.7)  
    eMac   Mac OS X (10.4.7)  

  • Already have wireless network, need help for set up of time capsule for wired backup only.

    Hello all -
    I have a time capsule that plugs into wall and used a wireless network to back up computer.  It would always mess up internet afterwards so I would unplug the time capsule and reset internet until the next back up.  my time capsule now will not link into my computer. It just flashes amber.  Spoke with apple and was told to come on here and ask for help for setting up time capsule for a wired backup only and to mention that I have a wireless network.
    Hope any of this makes sense.
    Thank You!!

    Spoke with apple and was told to come on here and ask for help
    Really?  The paid professionals at Apple told you to post on a forum where users.....just like you....are trying to answer questions?  We'll try to help, though.
    For starters, please tell us the make and model of the modem/router that you have now that is providing your wireless network.

  • Need FM for setting user status of sales transaction

    Hello experts,
    I need a fm for setting the user status of a sales transaction.
    I want to select some sales orders and for this I want to set the user status via a FM.
    Can anybody help me ?
    THANKS
    Gerd

    Hi,
    Try this if you want to execute a process
            "Set Status for Header
            CALL FUNCTION 'CRM_STATUS_CHANGE_FOR_ACTIV_OW'
              EXPORTING
                objnr                  = lv_guid_h "guid Header
                vrgng                 = gc_process-cf_approved "Process
                iv_ref_kind         = 'A'
              EXCEPTIONS
                status_not_allowed = 6
                OTHERS             = 7.
    If it is just the Status that you want to set:
    crm_status_maintain_ow
    You need to call CRM_ORDER_SAVE after any of this call
    Thanks!
    Amrut Tadas

  • Advice for setting up a mail server.

    Over the past few months I have been slowly merging away from websites that don't regard my privacy.
    I've changed search engines to duck duck go,  deleted my facebook, and now I would like to get away from gmail too!
    The only problem being I know nothing about hosting my own email.  I have an arch box that is on 24/7 running a diaspora pod.
    What email server would work best with this (If any)?
    Last edited by Si1v3r (2011-08-01 23:40:30)

    This was by far the best tutorial I found for setting up my own personal mail server:
    http://workaround.org/ispmail/squeeze
    I couldn't recommend it enough. There are a few quirks in places with the version differences but some reading around will sort you out.
    It's written in a very Archlinux style and explains the concept fantastically.
    Last edited by jack.mitchell (2011-08-12 21:23:40)

  • Design forms for multiple users

    Dear sir
    I am developing new application for my company.I don't know how to desing the the tables for multiple users and how to give rights to users to access certain forms.This application will use in two differnet languages.
    how to switch one language to other languages
    give me some ideas
    thanks
    Dev

    ...how to desing the the tables for multiple users and how to give rights to users to access certain forms.
    There are several ways to do this. One way is to create different database accounts for each user, and give each user priviledges to the tables they need. (Your DBA may need to do this.) Then, when the users logs in, check who it is and call the appropriate form.
    how to switch one language to other languages
    This is a common question. See Experts Experience Required: Direction In 10g or search the forum for additional help.

  • Arch workflow design advice for a designer?

    Sorry for the ambiguous title, I couldn't figure out what to call this post.
    I'm new to Arch, though not Linux, and I must say, this is an amazing distro (I'm on the 64bit version). Dead simple, super fast, and nearly as flexible as a Gentoo system (that can use binaries!). Pacman is rockin'.
    I'm a designer by trade: Web, video, and image. And I STILL boot into Windows for important tasks like Flash work, video work, and ftp work. I would obviously like to reduce that dependency, though there is little hope in the video department, right now.
    But for web, I see no reason I couldn't do it all in linux. But I'm not sure how to go about it. Here is the workflow I need, and I was wondering if you could advise how I might set up such a system (I have just a base system with Gnome installed right now):
    * WYSIWYG html and CSS editting (NVU/Kompose is fine for html, but NOT for CSS) for the design phase
    * A way to output image slices with html (does GIMP do this?)
    * Accurate web fonts
    * Reliable ftp, preferably one with drag n' drop functionality (I use filezilla on Windows, but I think the linux version lacks the drag n' drop)
    It's not a real complicated workflow, I just need to save time wherever possible because I need to work very fast. In windows, it's like having a ball and chain strapped to your leg, but it does work. With linux, I will very much appreciate access to terminal and file management advantages.
    I'm not stuck on Gnome, I just like the simplicity. I'm mainly interested in speed and efficiency (NOTE efficiency... I like time savers and fluxbox always seems to add clicks to my tasks). Let me know what you think! I may be able to move my flash work over with a little help from VirtualBox too, but I think I'm stuck when it comes to video . Thanks for any advice you might have!

    No offense, but using WYSIWYG to design web pages doesn't sound very professional imo. They just don't offer the control that one would want with the code. I have tried a few (Frontpage, Dreamweaver, NVU, Bluefish, ...) and they all suck. They just don't do what you want it to. You drag something or add some formatting and it just messes up the code. It's better to just use a text editor and view the results in browser. Maybe that's slow or inefficient for you, but I find that's the best way to do it.
    As for image slicing, I find that annoying as well. In Photoshop I never really liked the way it worked. I sliced a few images and then trashed most of the others. I tend to go for simple designs and focus on making it mostly CSS, so when I slice images it's usually a 1px wide/high gradient which would get repeated. I don't need image slicing for that. As for graphic intensive sites... well... really, you should review that. People still have slow connections and having a lot of graphics is just bad, even if your client wants it. You might as well go with flash, and waste some more bandwidth
    If you really want to do it though, I think Inkscape is quite a nice tool. I do all my designing in it, and though I don't use slicing, you can do it quite easily (though it's a bit hackish) by adding a layer and creating transparent rectangles around the stuff you want, then just select the rectangle and export it. I'm not sure if there's a more automatic way - there are plenty of tutorials.
    The MS-fonts should be fine, I just want to know that I am looking at an accurate representation of what I my windows customers will see.
    Fonts won't help you much there. You know most people use IE, so you need to view the website in IE regardless, and that means you need Windows (I think wine uses some weird IE version which uses gecko). Maybe there's some good Linux alternative for viewing stuff in IE, but I just view it on Windows. Also the font shouldn't change the general layout of the site... I don't see how that would be a problem unless it's some weird font that not everyone has, in which case you'd use @font-face anyway...

  • Loop control for set number of times per loop

    Hello everyone,
    I am having a problem with an assignment, I have gotten it all to work except one thing. The assignment was to create a quiz asking for the planets in order by using JOptionPane input dialog,loop, and StringBuffer. If the user answers incorrect show a message dialog with a hint and ask the same question again. If the user gets it wrong again, then just move on to the next question. I got it to work except I cant figure out how to make it ask the question again only once if the answer is wrong. Here is what I have so far:
       import javax.swing.*;
        public class SolarSystemQuiz {
           public static void main(String[] args) {
             String answer;
             int i ;
             int count = 0;
             int correct = 0;
             int wrong = 0;
             boolean crt;
             for (i=1; i < 10; ++i) {
                StringBuffer str = new StringBuffer("What is the " + getPlace(i) + " planet in the solar system?");
                do {
                   answer = JOptionPane.showInputDialog(null, str);
                   crt = getAnswer(i, answer);
                   if (crt) {
                      ++correct;
                      count = 0;
                   else{
                      ++count;
                      ++wrong;
                } while ( ! crt && count <= 1);
             JOptionPane.showMessageDialog(null, "You got " + correct +
                " answers correct\n, and " + wrong + " incorrect answers.");
             System.out.println(correct + wrong);
             System.exit(0);
           public static String getPlace(int spot) {
             switch (spot) {
                case 1:
                   return "1st";
                case 2:
                   return "2nd";
                case 3:
                   return "3rd";
                case 4:
                   return "4th";
                case 5:
                   return "5th";
                case 6:
                   return "6th";
                case 7:
                   return "7th";
                case 8:
                   return "8th";
                case 9:
                   return "9th";
                default:
                   return "You have created an error, please try again.";
           public static boolean getAnswer(int planet, String guess ) {
             String mercury = "mercury" ;
             String venus = "venus";
             String earth = "earth";
             String mars = "mars" ;
             String jupiter = "jupiter";
             String saturn = "saturn";
             String uranus = "uranus";
             String neptune = "neptune";
             String pluto = "pluto" ;
             switch (planet) {
                case 1:
                   if (guess.equalsIgnoreCase("Mercury")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;  
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with M and has " + mercury.length() + " letters");
                      return false;
                case 2:
                   if (guess.equalsIgnoreCase("Venus")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + venus.charAt(0) + " and has " + venus.length() + " letters");
                      return false;
                case 3:
                   if (guess.equalsIgnoreCase("Earth")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + earth.charAt(0) + " and has " + earth.length() + " letters");
                      return false;
                case 4:
                   if (guess.equalsIgnoreCase("Mars")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + mars.charAt(0) + " and has " + mars.length() + " letters");
                      return false;
                case 5:
                   if (guess.equalsIgnoreCase("Jupiter")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + jupiter.charAt(0) + " and has " + jupiter.length() + " letters");
                      return false;
                case 6:
                   if (guess.equalsIgnoreCase("Saturn")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + saturn.charAt(0) + " and has " + saturn.length() + " letters");
                      return false;
                case 7:
                   if (guess.equalsIgnoreCase("Uranus")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + uranus.charAt(0) + " and has " + uranus.length() + " letters");
                      return false;
                case 8:
                   if (guess.equalsIgnoreCase("Neptune")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + neptune.charAt(0) + " and has " + neptune.length() + " letters");
                      return false;
                case 9:
                   if (guess.equalsIgnoreCase("Pluto")) {
                      JOptionPane.showMessageDialog(null, "Correct!");
                      return true;
                   else {
                      JOptionPane.showMessageDialog(null,
                         "not it, the planet starts with " + pluto.charAt(0) + " and has " + pluto.length() + " letters");
                      return false;
                default:
                   JOptionPane.showMessageDialog(null, "Not in this universe, try again");
                   return false;
       } Thanks for your time,
    Brad

    This was a perfect example of how fast and easy a fix can be when the OP provides sufficient information and code.

Maybe you are looking for