Show System editor in JComponent

Hello,
Is there a way to embed the system editor in a JComponent? I have a tabbed container and want to open files in a new tab only for viewing. I also can't predict what kind of files they will be.
Any help is much appreciated!
Regards

No you can't just imbed System editors in a Swing compnent.
You can however use the Desktop class to open a file in the System editor. Read the section from the Swing tutorial on [How to Integrate with the Desktop Class|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] .

Similar Messages

  • How to show system time in JApplet?

    Hello,
    I would like to show system time in my JApplet the time should update when the system time is changed. i.e 10:10 is system time and the JApplet should show 10:10 , when the time changes in the system, the time in the JApplet should also be changed without refreshing.
    Any help please?
    Thanks

    push

  • How Can I change the default system editor to use it on Eclipse?

    Hi, I want to know something. In Eclipse, when I do the following with a file: Open With -> System Editor, GVIM is opened, and I would want to change this behaviour to another editor.
    How Can I perform this?
    Greetings

    Davigetto wrote:
    It doesn't work to eclipse... I don't know why, always gvim is opened... If I uninstall gvim, eclipse give me an error telling to me that was impossible to open the system editor.
    The variables mentioned above initially were empty (without content).
    Any more ideas?
    Greetings
    I'm pretty sure those ENV variables are only used for terminal / console operations, not GUI functionality. I think the confusing issue here, perhaps, was that Eclipse calls the option 'system editor.'
    What it is referring to, instead, is the application set in your file manager for opening a particular file type. For me, it opens Scite, as I have Scite set in Nautilus to open most 'text' types. However, I can change the behavior to open Komodo Edit for *.py files by simply right clicking on any *.py file, selecting 'Properties' and setting the appropriate editor in the 'Open with' tab. Now *.py files open in Komodo in any circumstance, including selecting 'Open wirh > system editor' in Eclipse.
    The procedure will be slightly different depending on your DE / file manager.
    Last edited by MrWeatherbee (2007-12-01 10:26:56)

  • Open file with system editor..

    Hello,
    I have a File (any kind of file) inside a java desktop application (swing) , and I want to open it with the appropriate system editor just like Eclipse does (right click on file | open with system editor).
    Could you provide sample java code doing that ? (I know it's not easy and haven't found much googling).
    Would that code be portable ?
    thanks a lot !

    Hai,
    Yeah, that true Desktop is available on Java 1.6. These Desktop class is derived from jdic.jar, which u can find by googling. It contains APIs and examples for opening a file with the system editor. Dowload the jar file add to classpath use it, thats all. Refer to the examples.

  • How to invoke system editor by double click a file(windows)?

    how to invoke system editor by double click a file(windows)?
    Just like that, double click a file named a.doc, windows will open it by word.exe.

    I try that:
    exec("cmd /c start winword \"c:\dir\a b.doc\"");
    like this posting(http://forum.java.sun.com/thread.jspa?forumID=57&threadID=634576 ), and It is ok.
    But now I make a file list with different files, .pdf,.xls,.doc and so on, I wanna double click to open one with its default system editor.
    if no space:
    exec("cmd /c start " + file);
    will invoke the default editor to open it. if space, it can't do it.
    And now I rename all files, replace space to _.

  • Showing system time in a panel..........

    AOA
    What may be a good appropach or logic to show system time in my application panel. And that time will properly synchronized with system time.
    regards

    Following is a code snippet.
    These functions are members of a class that extends JPanel. You will need to replace calls to some functions not included here (but whose semantics should be obvious).
        private JLabel timelabel;  // this is added to the panel in the usual way
        private Timer timer;
        private ActionListener updateTheTime = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                timeLabel.setText(timeString());
            JLabel timeLabel = new JLabel(timeString(), JLabel.RIGHT);
            add(timeLabel);
            timer = new Timer(1000, updateTheTime);
            timer.start();
        // returns a string with the current date & time
        protected String timeString() {
            // uc is created in another function
            Calendar uc = getMyCalendar(System.currentTimeMillis()));
            StringBuffer b = new StringBuffer(32);
            (new Formatter(b)).format(timeFormat, uc);
            return b.substring(0);
        }This sets up a label and adds a timer that triggers once a second that updates the text within the label.

  • HT1338 Tried upgrading to 10.8.2. It failed the upgrade. Currently the Software version shows "  System Version:     OS X 10.8.1 (12B19)" . But App store does not show 10.8.2 as an update

    Tried upgrading to 10.8.2. It failed the upgrade. Currently the Software version shows "  System Version:
    OS X 10.8.1 (12B19)" . But App store does not show 10.8.2 as an update

    You can Contact MAS here.

  • AppleScript Studio ignores breakpoins, and always shows "NO EDITOR"

    I have started several AS Studio projects over the last couple of years, and never stick with it because I've never been able to get its built in debugger to work.
    I have several breakpoints set, but when the debugger window opens, it is always empty, and the bottom pane always shows "NO EDITOR". AS Studio blows right by the breakpoints and displays the first window. I have gove over the preferences several times, and cannot find what might be set incorrectly ?
    In the past I was able to use Script Debugger, but it's a hack because you can only debug the generic AS functions, and not the AS Studio specific routines, so it's a very weak solution.
    I even stuck a -> DebugStr("Debugging...") just before the property declarations, all to no avail...
    I would be grateful for any insights on how to get this thing working...
    Best Regards,
    Bill Hernandez
    Plano, Texas

    Bill,
    Thank you for submitting this report. Apple values your time and input. While we cannot respond to every bug, please be assured that your report will be reviewed by the appropriate group.
    Your tracking number for this issue is Bug ID# 4899929. You may check status on this report via the 'My Originated Problems' tab or by contacting [email protected] When contacting us by email, please be sure to reference your Bug ID number.
    Please know that you may append additional information, including files, to your report through the 'My Originated Problem' section clicking the Bug ID number you wish to modify.
    Apple Developer Connection

  • My hp laptop shows system disabled pls anybody help..

    Shows system disabled error code
    75395019
    This question was solved.
    View Solution.

    Hi,
    Try the following.
    Right click the Start Menu icon, select Command Prompt (Admin), click ‘Yes’ to the uac prompt and enter the following commands - hit enter after each one.
    diskpart
    list volume               ( make a note of the number assigned to the usb flash drive )
    select volume X     ( replace X with the number assigned to the usb flash drive )        
    attributes disk clear readonly
    After you get the prompt that the write protect has been removed, type exit and hit enter, then type exit and hit enter again.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Attendee list showing system accounts

    As stated above, anyone run into this problem ? I can add teamserver web, _www, system to a meeting ....this can not be intended...
    the problem is ..there is no error log, there must be a way to exlude system accounts and just use the open directory exclusevily ???????

    You can set the view for showing system accounts or not in the menu bar of the server.app
    Go to View and there you can disable the "Show System accounts".
    It's sometimes helpful but can be confusing.
    Goodluck
    Jeffrey

  • Show system resources Current memory status: Severe Alert

    I have a couple of  9124e Blade switches that have Severe Alerts reported for the current memory status in the show system resources output as shown below. I'm guessing that the amount of memory free is a problem, but how can I resolve the issue? The Blade switches don't appear to be heavily utilized so how can I increase the amount of free memory?
    Load average:   1 minute: 0.13   5 minutes: 0.11   15 minutes: 0.09
    Processes   :   143 total, 1 running
    CPU states  :   0.0% user,   1.0% kernel,   99.0% idle
    Memory usage:    516128K total,    502064K used,     14064K free
    Current memory status: Severe Alert
    Load average:   1 minute: 0.52   5 minutes: 0.28   15 minutes: 0.12
    Processes   :   143 total, 1 running
    CPU states  :   0.0% user,   1.0% kernel,   99.0% idle
    Memory usage:    516128K total,    501140K used,     14988K free
    Current memory status: Severe Alert
    I have the same question about an MDS 9513 SAN Director with a Minor Alert. However this does have some healthy usage numbers.
    Load average:   1 minute: 3.38   5 minutes: 1.92   15 minutes: 1.25
    Processes   :   177 total, 3 running
    CPU states  :   70.1% user,   25.2% kernel,   4.7% idle
    Memory usage:   1033004K total,    884860K used,    148144K free
    Current memory status: Minor Alert

    The first two switches are fine.
    The free memory is physica free memory
    The used memory is included used+cache memory. Cache memory is reuseable
    The third switch 9513, the load average is high. This is indicated there are sone processes using more CPU.
    You can issue a support case to take a look at this.

  • Workflow approval  ID is showing system

    Dear Team,
    I am facing following issue. This is related to shopping Cart Workflow issue. We are in 7.02.
    Shopping card is having three lines. We have mapped workflow.
    For one line three approvals are showing
    and for other two lines two approvals are showing and third is showing as system.
    I checked all three users have position and userID mapped in SRM Org. and have valid User ID.
    We are using Z table to trigger workflow agents and we maintained the same.
    Can you guide me where we went wrong, what need to be checked.
    Regards,
    Sai Krishna

    Dear Sankarbabu and Sravan,
    Thanx for your replies.
    This is at PRD. We have mapped our agent determination on the following :
    1. Position 2. Requestor (Z field) 3. SC type(Z field) 4. Plant 5. Pur. Org. 6. Vlaue
    In above except position and value all are same for all line items. There is no user approval in 1st line. All approval are seniors only.
    In 3 line items 3 level is showing as System and 4 th line is showing correctly 3 level approvers.
    Regards,
    Sai Krishna

  • Showing System time using Java Beans

    Hi,
    Anyone have any source code for writing ajava bean using a text-field to show the current system time which is updated very second at run-time.
    Thanks.

    Hello.
    It sounds to me like you are in the wrong forum. This is for Enterprise JavaBeans, a server side tech, and not the GUI type of JavaBeans. For GUI JavaBeans you should take a look at http://forum.java.sun.com/forum.jsp?forum=39

  • Graph / Chart show system time in X-Axis.

    I try to plot the temperature graph/ chart with respect to my system time. The problem is that the if i select the relative time it starts from 00:00 and if i select absolute time it always starts from 05:00 in 24Hrs.
    I need X-Axis Chart/Graph show my system time and in Y- Axis it show the Temperature value which is received from serial port.
    Attachments:
    Temperature Recorder.vi ‏100 KB

    First I am very thankful to you for your kind cooperation. As I am beginner
    my questions may be the unintelligent.
    I have tried it and now the system time shows in graph. I have also a time
    sync problem. After initializing graph with the time being the value of time
    does not match with system time. Some time it is faster with respect
    to system clock and some time it is slower with respect to system clock. I
    observed it is slow when the data of graph is 1 byte long and when the data is
    2 or 3 bytes long it goes fast.
    The another problem is the chart Y-Axis Interpret HEX value (00 to FF) means 0-255
    points only. My data is ASCII string with 4 characters like ‘9562’. Every character
    will show the weightage as shown in attached file. I want to use the same ASCII
    string to the input of graph for single point. Instead of HEX value (00 to FF).
    And the another help from your side can you send me the book name or softcopy of LAB
    View tutorial (Easy understandable).
    Regards,
    Azhar
    Attachments:
    data.JPG ‏79 KB

  • Rule based monitors (RZ20) - Show system availability for selected systems

    Hi experts,
    I'm new with CCMS monitoring and need an advice for rule based monitors.
    I want to create three alert monitors (RZ20). One for our developing systems, one for our quality assurance systems and one to monitor our production systems.
    For the start, I want to show data in each of this monitor for free space of the filesytems (MTE class: "FilesystemFreeSpace"), for users which are locked out (MTE class "R3SyslogSecurity") and for the availabilty of the ABAP systems (MTE class "Availability_SysPercent_ABAP").
    I started to create the monitor for our developing system and got a problem. I started with the rule "CCMS_DEFINE_R3_SYSTEMS" to select our developing systems "HRT", "CRT" and so on. Under this nodes, I defined the mte classes ("CCMS_GET_MTE_BY_CLASS") which needs to be shown: "FilesystemFreeSpace", "R3SyslogSecurity" and "Availability_SysPercent_ABAP".
    When I checked the results, I was able to see the free space of the filesystems and whether a user has been locked out. Unfortunately, I recognized that the availability is not shown. Instead there is the message "No MTEs currently available".
    I'm aware, the availability cannot be shown on this way, since the agents are part of the central monitoring system and hence i need to choose the central system for "CCMS_DEFINE_R3_SYSTEMS". However I'd like to show the availability separated for each system under "HRT", "CRT" and so on. That means for example, there should me a node "HRT", which contains the free space of the filesystems, whether users are locked out, and the availability for the system.
    It's not a problem to get a solution with a static monitor. I simply create a virtual node "HRT" and tick the checkbox under "<central system>, ..., <availability>, <hrt> ..."
    However, I'd like to use rule based monitor to keep the effort at a minimum by not ticking thousand of check-boxes when I expand the monitored objects.
    I also tried to use the rule "CCMS_GET_AVAILABILITY_FOR_SYSTEM", but it doesn't work and SAP documentations say "This rule is reserved by SAP for later use".
    Does anybody know a solution for my problem?
    In addition, I've got one more question concerning rule based monitors: If I want to create a monitor for my developing systems, I'll not be able to choose "<all>" for "CCMS_DEFINE_R3_SYSTEMS". Do I need to create "CCMS_DEFINE_R3_SYSTEMS" for each system separately? Or is there another possible way?
    Thanks for your help in advance.
    Bob
    Edited by: Bob Norwich on Oct 17, 2010 12:04 PM
    I read something about logical MTE classes: http://help.sap.com/saphelp_nw04s/helpdata/en/31/5462405c910272e10000000a155106/frameset.htm --> Does I need to use this?

    Sorry Sean for my very late anwser.
    I was very busy in my company.
    Yes, I had tried you suggestion but it didn't work for me.
    The problem is, that the Agent "CCMSPING" is part of the central monitoring system by definition.
    Furthermore I tried to copy the default availabiliy monitor to look how it is definied. It didn't help.
    I made the decision to define my monitor differently (an extra monitor for the availability for all system) and replace this temporalily solution when ""CCMS_GET_AVAILABILITY_FOR_SYSTEM" will be available.
    The situation is not so bad after all.
    Thx for your help. I appreciate it!!
    Bob

Maybe you are looking for