Using Jspinner in Java GUI

I now have the code for my JSpinner which sets the date at todays date. The problem i am having is that my spinner is still able to spin backwards when i dont want to give the user the option to choose a date which has already past. My code is:
SpinnerDateModel dateModel = new SpinnerDateModel();
      spinner = new JSpinner(dateModel);
        Calendar calendarToday = Calendar.getInstance();
        Date today = calendarToday.getTime();
        Calendar calendarStart = Calendar.getInstance();
        calendarStart.add(Calendar.DAY_OF_YEAR, -1); // subtract a day
        Date start = calendarStart.getTime();
        Calendar calendarEnd = Calendar.getInstance();
        calendarEnd.add(Calendar.YEAR, +1); // how many years in the future to go?
        Date end = calendarEnd.getTime();
      spinner.setValue(calendarToday.getTime());
      spinner.setBounds( 16,520, 70, 24 );
      contentPane.add(spinner);Is it possible to stop it from spinning backwards?

And Swing related questions should be posted to the Swing forum
{color:#0000ff}http://forum.java.sun.com/forum.jspa?forumID=57{color}
db

Similar Messages

  • JAVA GUI window content does not fill out when window is enlarged (Win,Mac)

    I've been using the SAP JAVA GUI on a Windows XP workstation as well as a couple of MacBooks running OS X over the last year and a half or so, running versions from 7.10 r 7(maybe earlier) thru 7.10 r 10 (installed today.) The GUI has performed generally well on these platforms, but has one major irritation.
    When I open certain pop-up windows, such as the SPAD [List of Output Requests > Status Description |http://img171.imageshack.us/i/screenshot20091006at241.png/|screenshot], it usually does not open a  large enough window to display all the data - one must scroll horizontally and/or vertically to see the entire window content.  The real aggravation is that if [one enlarges the window|http://img101.imageshack.us/i/screenshot20091006at242.png/|screenshot] so as to see more data, the resizing is ignored.  The contents of the window are still displayed within the original window boundaries instead of filling out the expanded window.   It is not possible to get the entire window contents displayed, it is still necessary to scroll around.
    What am I missing here?   How can I get window resizing to work correctly?   (Or is there a way to make such windows at least open up at a larger initial size??)
    I only found one other thread in this forum, Sap gui screen size in ubuntu., which seemed to be addressing the same problem, but the suggestion was to apply the latest patch to the GUI and get JAVA 1.6.   One would think that since that post in 2008, any patches would have made it into the latest revisions.  I'm already running Java 1.6.
    SAPGUI for Java 7.10 rev 10
    (Version ID 071000041000)
    Tue Sep 8 09:49:53 MEST 2009
    uw1059, 710_REL, 1093492
    Java VM: Apple Inc. Version 1.6.0_15
    OS: Mac OS X(i386) Version 10.6.1
    SAPGUI for Java 7.10 rev 10
    (Version ID 071000041000)
    Tue Sep 8 09:49:53 MEST 2009
    uw1059, 710_REL, 1093492
    Java VM: Sun Microsystems Inc. Version 1.6.0_15
    OS: Windows XP(x86) Version 5.1
    Any suggestions?  Anyone else even seeing this?
    Thanks!
    Rich

    I'm now running
    SAPGUI for Java 7.10 rev 11
    (Version ID 071000041100)
    Tue Dec 8 16:04:41 MET 2009
    uw1059, 710_REL, 1119101
    Java VM: Apple Inc. Version 1.6.0_17
    OS: Mac OS X(i386) Version 10.6.2
    I've also updated my XP system to 7.10 rev 11 and both continue to display the same failure to resize corrrectly.  
    Here's a [video capture of this behavior|http://img163.yfrog.com/i/sapresizebug.mp4/].
    Given that installs on two separate operating systems have consistently misbehaved like this, I have a hard time believing it is something  we are doing.  (But not that hard...)  I find it hard to believe that is the way these screens present on most SAP sites...
    Any comments or suggestions would be welcome!
    Rich

  • Accessibility and Java GUI testing

    Hi,
    Can java accessibility be used for developing java GUI testing tool for applet embedded in IE? If not is there any other way we can test Java Appet GUI?
    best regards
    Krishna

    I do not know of a free tool, but you can use the Robot class in Java to create what you need.

  • Java GUI instead Browser GUI for OEM10gR2?

    Hi,
    Is there any possibility to use the standalone Java Gui 10gR2 against the EM10gR2 Repository?
    Like once with OEM9, when there was the possibility to logon to the Management Service or open in standalone Mode.
    Greetings
    Armin

    Yes, i'm familiar with this standalone version. I'm looking for a possibility to connect this java gui to my EM10g Repository. So i don't have to add every database again in my standalone version.

  • Can I Open an HTMLHelp (*.CHM) File from Java GUI Application?

    I ussually use Delphi to develop my applications and I can open an HTMLHelp (*.CHM) file from my application. Can you show me the ways to do it from my Java GUI applications?
    Thanks for everyone.
    Budi Raharjo
    http://budiraharjo.blogspot.com

    http://www.google.com/search?q=java+chm
    Seems like there is some 3rd party software available for that.

  • New Features for Java GUI

    Hello everyone!
    Can anybody tell about new features in SAP GUI for Java. I think It's emasculate now. It doesn't contain New ABAP editor, Network graphic, normal Screen Painter... I really enjoy adding themes and other stuff, but when these functionality will be added?
    Thanks.

    Hi,
      I use Java GUI from version 6.40, so i didn't know new ABAP editor for years. Once somebody shows me its features ...and I found that it is really good editor compared with previous Notepad-like frontend editor. But I have to say that customized version od Gvim used as external editor is in 90% better then new ABAP editor (the only problem is that double click on object doesn't work, but some workarounds are known for double-click on locally defined objects).
    Graphical screen painter is generally good tool, but once I cannot find any feature (sorry, I forgot which one, it happens about 6 years ago). I ask a SAP guru sitting near me. He comes, switch graphical screen painter off and click to a box in non-graphical version of screen painter. Then he told me that some features are not accessible in graphical screen painter. It was last time I used graphical version of screen painter.
    Themes? Works .... at least for me (Linux 32 bit and now Linux 64 bit too).
    So I think that Java GUI is usable (at least on Linux/Mac, I am not sure how in works under Windows) but you cannot stick on all features (and maybe you can find better working variants of it). E. g. I have no problem with new ABAP editor, it would be much better for me, if I can open external editor clicking to "Change" button in SE38 directly instead of click plus selecting external editor from menu.
    Regards,
      Pavel

  • Cannot connect a Java GUI client to an EJB

    I am having problems trying to make a Java GUI client connect to an EJB. I am using JRun4.
    At first, I tried making the Java GUI client a part of the enterprise application that I am building (of which the EJB is a part of). I included the client as a Java module in the application.xml of the enterprise application.
    However, when I try to start the server, containing this application, I get an error saying:
    Application authentication required. Incorrect method call.
    Now when I try to execute the application from the console, it works fine except when it comes to the part when it has to connect to the EJB. At this point I get an java.lang.reflect.UndeclaredThrowableException. Here's the stack trace:
    java.lang.reflect.UndeclaredThrowableException
    at $Proxy1.create(Unknown Source)
    at mds.Caller.actionPerformed(Caller.java:135)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: jrun.ejb.invocation.ContainerNotFoundException: The EJB container for boss-ejb#Boss could not be found.
    at jrun.ejb.invocation.AbstractInvocationProxy.findContainer(AbstractInvocationProxy.java:58)
    at jrun.ejb.invocation.LocalInvocationProxyImpl.invoke(LocalInvocationProxyImpl.java:53)
    at jrun.ejb.invocation.ClientInvocationHandlerImpl.invoke(ClientInvocationHandlerImpl.java:198)
    ... 25 more
    Since the bean is local, I am using a local reference to the bean in the lookup in the code of the client:
    Object o = context.lookup("local/BeanTest")
    I tried to use:
    Object o = context.lookup("java:comp/env/ejb/BeanTest")
    and added an ejb-local-ref in the application-client.xml file of the client. But when I try executing the client in this case, I get an error saying:
    No such binding: ejb
    I wish someone can help me out with this. My main aim is to get the app client talk to the EJB. Thanks a lot in advance.
    Soham

    I am not sure of a tool to view the JNDI tree. I have one in Weblogic console. But you can check the JNDI names with a small sample code.
    import java.util.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    public class TestEnvironment {
        public static void main(String[] args) {
            Context context   = null;
            Object object     = null;
            // Hashtable for environment properties.
            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            env.put(Context.PROVIDER_URL, "t3://localhost:7001");
            try {
                context   = new InitialContext(env);
                NamingEnumeration enum = context.listBindings("");
                while (enum.hasMore()) {
                    Binding binding = (Binding) enum.next();
                    System.out.println("Name: " + binding.getName());
                    System.out.println("Type: " + binding.getClassName());
                    System.out.println("Value: " + binding.getObject());
            } catch (Exception exception) {
                exception.printStackTrace();
    }Hope this helps.

  • Plz tell me how to use JSpinner with JTable

    I have retrieve records from database but as the number of records(rows) are more than 1000 , i want to use JSpinner with JTable . plz solve my problem by giving the appropriate code for the same.

    hi
    check this links
    http://www.exampledepot.com/egs/javax.swing.table/CustRend.html
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    hope this will help you.. this explains exactly what you want.
    regards
    Aniruddha

  • SAP Java Gui in Solaris 10 x86.

    Who run the Java Gui in Solaris 10 x86?
    After I installed Java Gui in Solaris 10 x86 and run guilogon, when I connect the server I created, I got the error message:
    Attempt to load shared library /opt/SAPClients/SAPGui7.00/binlibJPlatin.so failed.
    The library file exists, so either the program
    don't has the privileges to access the library
    or the library is not loadable by the shared object loader
    Technical information:
    Error location: GuiJniLoader.loadPlatinLibrary()
    Error message: /opt/SAPClients/SAPGUI7.00/bin/libJPlation.so:ld.so.1:java:fatal:/opt/SAPClients/SAPGUI7.00/bin/libJPlatin.so:wrong ELF data format:ELFDATA2MSB
    After I confirm the dialog, another error message appears:
    JniAgiLibAdaptor.<init>: Cannot load JNI library.
    I checked the supported OS, it doesn't contains Solaris 10 X86, but I think Solaris 10 was open source, just like linux, why doesn't SAP Java Gui support Solaris 10 X86? And now , how can I solve this problem?

    What you see is what happens when the Java runtime running on Solaris 10 x86 tries to load a library which is compiled for SPARC.
    Because of the native parts in SAP GUI for Java, compilations and installers are required for each OS - HW combination.
    The supported platforms can be seen in SAP note 954572. For Solaris only SPARC is currently supported.
    Because of the effort needed for compiling, testing, support etc. it is required to focus on OS - HW combinations widely used on desktop machines and Solaris 10 on x86 currently does not seem to be one of those.

  • Integrating Another Program Into A Java GUI

    HI
    I have 3 classes here. One is a Java GUI, the other two are involed in
    stripping and processing of information off a webpage.
    Of these latter two classes, one contains a main method which connects
    to a webpage and reads the info off it, it calls the other class which
    parses this information and holds the variables I need to create
    buttons for the main gui!
    Is it possible at all to integrate, the class that reads the webpage,
    into, the Java GUI class.I need to do this to access the variables
    that the parsing class is holding, as previously I have had to create
    an instance of this class in the webpage reader class, but this was no
    good to me as the GUI could not access this information, i.e can I
    create an instance of this stripper at the begining of main in the GUI
    class so as I can use the results for this for producing my buttons?
    I've tried to do this but I am getting unresolved symbol errors. I was
    wondering should I use global variables to hold the needed info also ?
    Any help at all greatly appreciated,
    Thanks
    Gerry

    I did what you're describing. Sounded simple enough. You put the same logic in main() into the applets init() and you can run as app or applet. Worked well in my IDE. Then the troubles start.
    Visit
    http://www.martinrinehart.com
    and read the Article, Launching Applets. That will get you started on launching a Swing application. (Try my Sample, DawnPainter, to give you an idea about how nice this can be when it works.) I promise but don't deliver (yet) an article on the javascript library I wrote that solves all the problems. For non-commercial use you can get your own copy:
    http://www.martinrinehart.com/examples/launchApplet.js

  • Cannot read list of frontend printers - Printing in SAP JAVA GUI for MAC

    Hello,
    I am trying to print a Spool request in SAP Java GUI 7.10. I am working on Apple with OSX operating system. I get this error message -
    " Cannot read list of frontend printers " - Message no. PO781
    What do i need to do to take a print out from SAP on my Mac.
    Thanks
    Buddy

    Hello,
    which printing access method you are using?
    You might want to have a look at [note 821519|https://service.sap.com/sap/support/notes/821519].
    Best regards
    Rolf-Martin

  • Use OWB with java or web service

    Instead of using Oracle warehouse builder GUI design and control center, may I use Java or Web services to access the functionality of warehouse builder.
    where can I find these Java or web services API document.
    Thanks

    I think I can answser my own question by some investigation now. Javadoc is here:
    http://download-west.oracle.com/docs/html/B12155_01/index.html
    but looks like this never been metioned. does it means code to Java API is not recommanded?
    also, still not able to find any tutorial about using this APIs except javadoc

  • Printing local with JAVA Gui 7.10 on a MAC

    Hi,
    I installed the JAVA GUI 7.10 on my MacBook Pro and it all works fine. The only problem I have is local printing. Since I do not have SAPLPD anymore, I am not able to use local printing. Is there another possibility to do local printing with a Mac?
    Thanks Maarten

    Maarten,
    Yes.
    The following text is from Chapter 2. "Release Notes" / Section 2. "Missing Features" of the JavaGui HTML documentation:
    Front-End Printing Using SAPLPD (access method 'F') is only supported on Win32 platforms. For newer back-end versions, a new printing architecture for all platforms supported by SAP GUI for Java (access method 'G') is available, see SAP Note 821519 for details.

  • Developing a JAVA GUI builder

    Hi,
    I've been a middle tier and back end developer mostly, and i've not much development on swing. By that i mean i did not get much into swing programming other than using netbeans gui designer or jdeveloper for front end user interfaces. I have a general knowledge about swing though, how to create a custom component and stuff like that.
    However, i have a personal project for which i'd really like to build a gui designer for myself. I know that i can find my through if i dig hard enough, but that means a lot of time. Yes, i can use one the existing gui builders, but this time i want to add a little bit of experience to my swing programming skills, so that i can develop tools for my own development more easily.
    Looking around, i see a lot of gui builders, some being open source, but none of them gives me the impressing of being a good example for me. Some of them (like netbeans gui building code) seems to large to examine, and not many simple examples for this seem to exist.
    In general, there appears to be a lack of guidance for this kind of development. Swing development resources are plenty, but what about a little more custimized goals like mine ?
    I want to create a simple designer with swing, but certainly this kind of task has it's tricks ? How should i represent components (txtbox, listbox, etc) on the designer ? Do i use swing components directly in the designer ? Or do i create representations of them ? What are the tips and tricks for this kind of task ?
    So, what kind of resources can i use for making this task easier for me ? Which books would be helpful ? Or any online resources for getting up to speed for creating a simple gui designer in java?
    I hope i could express myself clear enoug, and It'd be really appreciated if anyone could contribute about my next step
    Best regards

    If you actually do go about creating a visual GUi builder, 90% of your code will revolve around using the java.beans package. So you should start learning that first.
    Here is an example of how to build a visual GUI builder using the java.beans package:
    https://bean-builder.dev.java.net/guide/tutorial.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/beans/package-summary.html

  • Any Java GUI Builder, please?

    Hello everybody!
    I have to develop a GUI in Java and I am totally rookie on this (Java & GUI development). What I would like to know is whether there is a kind of GUI Builder for Java with free license. I mean, a program which makes me easier to choose where to put the different menus and buttoms of the GUI.
    I explain you a bit more. The IDE that I have to use is Eclipse. The GUI that I have to implement will be done in Java, but what I have to do is to convert a XML file in the GUI (read, parse?). This way I will be able to modify the XML using the GUI and then save the file again (this way the XML file will have been modified). I am working in a windows environment in spite of the GUI will be able to work in Linux too (thanks to a Java VM).
    Thank you very much for your answers! And remember, I need a free license program.
    Fran.

    Encephalopathic wrote:
    My rec: don't use a GUI builder. At your stage, using one will hinder your ability to learn Swing and will set your Java education back at least 6 months if not more. Learn to code Swing by hand. They're not bad to use once you understand Swing, but even then, most professionals that I know do not use them in professional products (they say that the "ugly code" produced can be hard to maintain), but use them mainly for quick prototyping.Couldn't agree more, and I'm not even close to a professional level. I started out with Matisse in Netbeans. I spent quite some time learning how to use Matisse to build a rather large GUI. I spent even longer wrestling with it to try to get it to place components where I wanted them and at the size I wanted them. Then, after all the time spent on building the GUI, I found that I had to start over again from scratch because the code it had generated was so unnecessarily huge and fragmented that adding in the application's functionality was simply not feasible. Not to mention that after a certain point, Netbeans consumed so much memory to keep track of all the GUI elements that it crippled my PC (~997MB RAM) soon after opening the project.
    So now I have to start over from scratch and have to hand-code it too. I would have been better off just starting by hand-coding in the first place. That way I wouldn't have lost so much time.
    Besides, If you have to build a parser that builds the GUI from the contents of an XML file, I don't think any GUI builder would be of any use to you. Surely you'd have to study swing to a degree where you can hand-code a GUI with ease if you want to have any chance of building a program that can build a GUI on your behalf based on arbitrary XML content.
    I could well be wrong because I'm still very much a beginner myself, but in my experience elsewhere I've always found that if you want to build a parser for something you're going to need to know whatever it is you're building a parser for like the back of your hand.

Maybe you are looking for

  • Business Area not populated for F110 but it works for FBZ2

    Hi all Gurus, I have marked my co code in OBY6 for Business Area Financial Statement.  In GL a/c, I also marked the FSG to be "Required" field.  For posting key field status, it set to "Optional" During F110 auto payment run, the Business Area field

  • Acrobat 9 Professional forms missing data after upgrade to Adobe Reader 10

    My principal has a macbook pro with OS 10.6 on it, and Acrobat 9 Professional. One of the Xerox technicians in our district came around and updated Adobe Reader on her computer to AR 10. This caused her computer to lose the license key for Acrobat 9

  • Severe issues when integrating flash paper in director

    I'm trying to integrate flash paper documents into director projector, but there are 2 severe problems about usability: 1. the mouse wheel doesn't work, so i can't scroll document with mouse 2. i see two cursor on document, the standard arrow cursor

  • How to track WCM Operaional WCD changes

    Hello,   We are in stage of implementation of Work clearance Management (WCM). There is requirement to track change history of operational WCD attached to isolation application. Maintenance person proposes isolation and operations person prepares the

  • File content conversion example

    If the first line  in the FCC file is  having some company Info. from the next lin onwards it is having the data. i have to avoid that info & transfer the data only Hoew can proceed?