Refreshing JTable remotely or in another computer

I have search the forums but i could not find the appropriate answer for my problem.
I created a jtable with two buttons to add and delete row. This jtable and the mysql table which is the source of the data in the jtable, can be accessed by any computer on which the java program activating it, is installed. So it is possible that there could be several instances of the jtable running at the same time.
On the computer where the add or delete button is activated, the mysql table and the jtable is updated/refreshed accordingly. There is no problem at all.
However in the other computers where the instances of the jtable is running, the jtable is not refreshed at all. I can only refresh the jtable if I exit and restart the program.
How can i refresh all the instances of the jtable everytime its contents are changed by any one of the computers running it?
I have experimented using table.repaint, table.setUI, model.repaint to no avail.
I wonder if I have to use RMI for this. Any help is very much appreciated as I have been wrestling with this problem for sometime.

This solution by camickr works! My only problem is that it will not activate the cellrenderers and the methods to customize the columns. Thank you camickr. I hope you can help me with the cellrenderers.
These cellrenderers work well with the original table.
Here is the code:
JButton Button_Refresh1 = new JButton("Refresh");
Button_Refresh1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Object skedData[][] = getSchedule(); //returns data from database;
DefaultTableModel updtskedModel = new DefaultTableModel() {
public boolean isCellEditable(int row, int column) {
if (column == 1) {
return false;
} else {
return true;
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
updtskedModel.addColumn("Date");
updtskedModel.addColumn("Patient Name");
updtskedModel.addColumn("Status");
updtskedModel.addColumn("PatientNo");
updtskedModel.addColumn("SeqNo");
for (int i = 0; i < skedData.length; i++) {
if (skedData[0] != null) {
updtskedModel.addRow(new Object[]{skedData[i][1], skedData[i][2], skedData[i][3], skedData[i][0], skedData[i][4]});
TableColumn col1 = skedTable.getColumn("Date");
TableColumn col2 = skedTable.getColumn("Patient Name");
TableColumn col3 = skedTable.getColumn("Status");
TableColumn col4 = skedTable.getColumn("SeqNo");
col1.setPreferredWidth(75); //this does not work
col1.setCellRenderer(new DateRenderer()); // this one does not work and there are no error messages also.
col2.setPreferredWidth(100); //this does not work
col3.setCellEditor(new DefaultCellEditor(StatusBox)); //this one does not work and there are no error messages also
skedTable.setModel(updtskedModel);
//elsewhere in the code, the following class was defined.
static class DateRenderer extends DefaultTableCellRenderer {
public DateRenderer() { super(); }
public void setValue(Object value) {
setText((value == null) ? "" : regdf.format(value)); //regdf is defined elsewhere using SimpleDateFormat.

Similar Messages

  • Re:iMac remotely accessed from another computer and location?

    Can you access an iMac remotely from another computer and location if there is knowone to switch it on?

    Barbara,
    Both are legitimate concerns, I'll address each as best I can.
    As for the the power issue, well that's going to be the case with any computer. We have many choices, most of them impractical for example take your house off the grid, put in your own power source (solar or wind powered) which clearly for most of us is totally impractical. The next thing would be a backup-generator like a hospital or other mission critical facilities (police & fire houses) have. While this is more practical again it's stretching the limits again for most of us. So the next thing is a healthy battery back up system that can maintain power to a computer for several hours if necessary. While they are still expensive they are far less expensive than the first two solutions. Of course you can set the energy saver settings to power on your computer after the power comes back on if even the UPS battery goes dead. I haven't tried this remotely however I think it might work.
    Next is security, DropBox and Logmein both address this themselves so I would recommend looking into their solutions. Personally I find them trust worthy and don't have an issue. Even if you use MobileMe you would still have the same concerns, and how about Google, and all the other major players. To me Google while it's a vast resource and extremely helpful if for some reason they decided to become the Evil Empire they have far more access to your information that anything. Anytime you do a simple search they are collecting information about you. For example let's say you are looking for ATM's in a new city, they can capture your search and if they were evil enough they could track your every step. Is this far fetched and ridiculous, of course it is but it is possible. However this is the case with any Internet based computing, if you use some basic common sense for the most part your data is pretty secure. I'm much more nervous about the minimum wage clerk at Taco Bell taking my credit card information than Google, Apple, Logmein or Dropbox doing so.

  • Change refresh rates and resolution on another computer

    Hi, am i able to use a LAN cable from Computer A and connect to computer B then change B's refresh rates and resolution? for example from 800x600 to 1024x768 then change refresh rate from 60Hz to 75Hz. please advice thanks.

    Hi Trig,
    Thanks for your post and I hope your well today.
    There are two parts to this - in my mind:
    1. Changing Screen Resolution Programmatically From LabVIEW
    2. Use VI Server to remotely call a VI i.e. Computer A calling VI on Computer B which then runs the VI mentioned in 1. 
    1. 
    This link is a dev zone article which has code for programmatically changing the screen resolution
    http://zone.ni.com/devzone/cda/epd/p/id/1429
    Try it out. 
    2.
    VI Server
    The NI Example Finder contains some expamples for this.
    Building VI Server Applications
    http://zone.ni.com/reference/en-XX/help/371361E-01/lvconcepts/building_vi_server_applications/
    If you could provide more details, maybe versions of LabVIEW etc then maybe we can help you some more - have you got some code yet? And did you have any thoughts on how to do this?
    Another method I have consider is:
    Using a tool such that runs an exe or script which alters the resoltion.
    Then using the cmd (comand line) or in LabVIEW System Exec.vi to run the exe (via VI Server). 
    How To Change Your Screen Resolution From A Command Line
    http://desktopfeedbag.wordpress.com/2007/12/27/how-to-change-your-screen-resolution-from-a-command-line/
    Hope this helps, 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • I have another computer that a virus may have taken over and I cannot log into it anymore.  I just downloaded Itunes on a new computer but most of my songs are not on there.  Is there a way to still access or find those songs?  Remotely or another way?  I

    I have another computer that a virus may have taken over and I cannot log into it anymore.  I just downloaded Itunes on a new computer but most of my songs are not on there.  Is there a way to still access or find those songs?  Remotely or another way?  Or do I need to take it to a tech to get my files off of my hard drive?

    Edit > Preferences > Store check Music under Automatic Downloads.
    Open the iTunes Store from left hand column, then select Purchasedfrom the column on the right, click the Not In My Library button and select the tunes you want to download again.
    That said, you seem to be under a misapprehension as to how iTunes works, or at least how it has worked in the past. It has, until recently, been up to you take care of your purchases once they have been downloaded. You had a one-time download which you were reminded to back up. With the recent change to this policy you can at least download your store purchases again, but having a personal backup of your iTunes store purchases, stuff purchased elsewhere and files ripped from your CDs will still be preferable to gathering all the stuff together again in the event of a disaster.
    For a backup strategy see this User Tip.
    tt2

  • HT3819 I can use remote on my iPhone to connect with my iTunes library, but i can't connect to another computer using home sharing to access apple tv.  I have used the same access ID and password that is used for the apple tv.

    I can use the Remote app on my iphone to connect with my itunes library on my computer, but I can't connect to the Apple TV using home sharing with another computer in the house.  I am using the same ID and password that the apple tv uses to connect with the other computer.  Also how do I check what version of IOS that my iphone is using?

    Version:
    iOS Settings>General About (or it'll say when you hook it up to iTunes)
    Are all the devices on the same physical network?  I think you're saying all are set up using the same home sharing credentials.
    If you've not done so restart all devices and your router.
    If you can get any of the devices connected by ethernet to reduce the wifi burden that may help but to be honest I would not expect simply beoing on wifi to prevent devices/computers appearing in the list.
    Does the other computer have any firewall or port blocking software running?

  • Need to Access the dvd on another computer

    I need to access a dvd player on another mac to install some software and i have followed the apple instructions below for sharing another computers dvd and everything works until its time for me to select remote disk under devices...there is nothing there to select...The other mac shows that it is sharing it dvd player...the internet connection is working as i am able to share that computers screen but cant get it to provide me with "remote disk"...any thoughts?? I do not have an internal DVD player it has been turned into a second hard Drive...thank again
    To access a DVD or CD on another computer:
    Make sure both computers are on the same network (wired or wireless), and the DVD or CD Sharing software is installed on the computer with the optical drive.
    Make sure the computer with the optical drive is set up to share the disc.
    On a computer with Mac OS X v10.4.10 or later: Choose Apple menu > System Preferences, click Sharing, and then select the “DVD or CD Sharing” checkbox. Select “Ask me before allowing others to use my DVD drive” if you want to be notified when a computer tries to access the drive.
    On a computer with Windows XP or Vista: Open the DVD or CD Sharing control panel and select “Enable Remote DVD or CD.” Select “Ask me before allowing others to use my DVD drive” if you want to be notified when a computer tries to access the drive.
    Insert the disc into the optical drive.
    On the computer without the optical drive, select Remote Disc under Devices in a Finder window sidebar. If you see the “Ask to use” button, click it.

    If you are using two Macs you can try to do this via Target Disk Mode. Info here:
    http://docs.info.apple.com/article.html?artnum=58583

  • How do I recover another computer's time machine backup to an external drive

    I did much searching on this and came up dry on how to clone a new drive on one computer (A) from a Time Capsule backup from another computer (B) for the purpose of installing on that other computer (B).
    Specifically, I want to replace the drive in my wife's MacBook Pro (Snow Leopard 10.6.8) with an SSD. I have a drive Dock that can be attached to the iMac (Mavericks 10.9.3) with FireWire 800 (and also to the MBP using a much slower USB2). I wanted to allow her to use her MacBook Pro (browsing only, no new documents or emails) while I used my iMac to create her boot drive from her Time Capsule backup, but couldn't figure it out. Migration Assistant assumed I was migrating to my own Mac or to a remote Mac running MA. I couldn't figure out how to get CCC to just see one backup on Time Machine as input rather than the entire volume with all the backup versions. Everything I found with Google assumed I was using the MBP for the restore. CCC won't clone to a remote drive either--local only.
    This is academic at this point as I connected the dock to the MBP over USB and am now using CCC to the attached drive, which will take several hours during which I assume we shouldn't be using the MBP. Maybe that was the only way all along? I suppose another way would have been to install the SSD in the MBP and boot from a DVD and use Migration Assistant. I'm just curious for the future as I help friends upgrade from time to time.

    Since you don't really have a question, I will give you a very broad information source for the next time you have a Time Machine question.
    Please visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Oh, you cannot use a computer whose only disk drive is the target of a an OS X cloning operation regardless of what software is used for the clone. You can, however, use the source drive except if you try to clone using Disk Utility.

  • Windows 7 fails when authenticating to another computer on the network

    In Windows 7 (home premium, 64 bit), I am attached to a VPN (Using OpenVPN). Then, whenever I try to either:
    - Use explorer to look at the file system of another computer 
    - Use the remote desktop connection on another computer
    - Map a folder on another computer as a network drive
    ... in all of these cases, I get the authentication dialog and once I send my username and password, it crashes. For example, when I use explorer, it hangs, and then comes back with the message: "Explorer has stopped working"
    I have elsewhere seen a proposed solution for similar symptoms, of deleting this key: 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions\MachineThrottling 
    However, this is not applicable in my case, as the key is not present.
    I don't think that this can be a problem with the network, because:
    a) this works fine from a different computer, running XP,
    b) I have in fact seen this working on this computer, but just once, straight after a system restore, and I can't replicate the success by doing another system restore.
    c) If it were a problem with the network, you would expect Windows to fail gracefully.
    Additionally:
    - Disabling the firewall doesn't help.
    - Disabling the antivirus software (AVG) doesn't help.
    - Doing a clean boot doesn't help.
    I'd be grateful for any suggestions.

    try changing windows authentication levels
    http://social.technet.microsoft.com/Forums/windows/en-US/aca3e2d0-6d43-431f-bbba-3c01aea6d5a6/changing-authentication-level?forum=w7itpronetworking
    http://technet.microsoft.com/en-us/library/jj852207.aspx

  • How to access applications in another computer

    how to make use of java programs to access applications or files in another computer across the same network or over the internet. can help???

    how to make use of java programs to access
    applications or files in another computer across the
    same network or over the internet. can help???Overly broad question. Next!
    No seriously; what do you want ? Do you want to execute something (a process); do you want to execute it here, or there ? Do you want to connect to some service to do it for you ? Do you want the service to be distributed ? Do you want the service to maintain state ? Do you want to do it transparently inside your code, or do you want to explicitly implement a client API ?
    Your choices range from:
    - nfs or smb (execute here, executable there)
    - rsh or ssh (execute there, if the remote part is UNIX)
    - cgi over http (very common, but stateless)
    - CORBA or rmi (transparent remote OO calling)
    Read up on all these, and provide yourself with answers !

  • Messages app - how to disable on another computer

    I logged in temporarily on another computer, not related to my home office.
    When I log into my Mac from home, I get a message that "computer xyz" (computer where I was working over the last week) was associated to my Messages account.
    Is there any way to turn off or disable the Messages app functionality on that system - remotely ?
    I won't be back at that location for some time. I can't be 100% sure the computer is being used by anybody, as this may just be a delayed message.

    Hi,
    At this point you need remote access to that computer.
    There is no Self help to De-register a Mac like there is for an iPhone https://selfsolve.apple.com/deregister-imessage
    Accessing the computer and opening the Messages app to delete the Apple ID is only part of the issue.
    You can Sign Out  but this leaves the .plists that holds your accounts Info and alternatives still readable in the ~/Library/Preferences
    It also leaves the  Keychain items for the IDS: yourAppleID-Auth Token in place.
    Ideally it might pay to delete the whole ~/Library/Preferences.
    If you think that this may be too deep  then remove all the com.apple.iChat.*.plist items
    Anything with iMessages in it.
    Plus com.apple.imagent.plist and anything with IDS  in the name  (most importantly the one with madrid in the name).
    Do the same with the Keychain.  (Any item with IDS in the name)
    Deleting your name from the iMessages account in the app does not remove it from the .plist
    Nor does it remove your alternatives that are likely to include your iPhone number.
    It would be worth deleting the contents of ~/Library/Messages as these database items hold the iMessages chat history.
    Saved chats are in ~/Library/Containers/com.apple.iChat/Data/Library/Messages/Archive
    8:50 pm      Sunday; April 5, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Writing to file on another computer

    How can I write to a file on another computer using labview. My
    computers are networked together using Windows networking.
    thanks,
    stephen

    > How can I write to a file on another computer using labview. My
    > computers are networked together using Windows networking.
    >
    This is something that is a little different with each
    OS. You either need to mount the drive of the remote
    computer, or you use a string that includes the computer
    name, usually called a UNC name.
    Assuming you are on a PC, try using something like
    \\PCName\d:\directory\file.
    This is the path to the file, Open it, Write to it, and
    Close it. If you have problems, it may very well be a
    permissions problem. The remote computer will have to
    allow you to write to the disk. Typically this will
    involve going to the remote computer and publishing
    the drive or directory.
    Once you have permission and figure out what the path
    looks like, you
    just use the regular file I/O functions.
    This is the most straightforward approach and like I say,
    its done slightly different on different OSes. For
    computers that are more remote, or when you are changing
    OSes, you can use ftp client VIs or lots of other tools.
    Greg McKaskle

  • Can dreamweaver be installed on my cloud disk for access from another computer?

    I sometimes need to work at the clients office.  Can I install Dreamweaver and Photoshop on my Cloud disk for access remotely?

    Products such as Dreameaver are still desktop applications and as such need to be installed on a computer. They do not run from the Creative Cloud website.
    You could ask permission of your client to install Dreamweaver on their computer. And then before you leave for the day from the menu choose Help > Sign Out to deactivate your subsscription. Once done with that client you could uninstall Dreamweaver from the computer.
    Less invasive solutions to working with the client would be to use a solution like LogMeIn (https://secure.logmein.com/), Windows Remote Desktop or VNC to remote into your computer. Here is one article article covering this http://www.wikihow.com/Access-Another-Computer-from-Your-Computer.

  • How to control labview VI from a program not written in LabView on another computer?

    I am tasked with finding a way to control (an existing) LabView application (VI) from another computer (networked together) as part of a larger application which is not constructed in LabView (likely C# .Net Windows app).
    So, I am looking to find a solution that
    a) requires minimal change to the existing stand-alone LabView VI
    b) does not require LabView on the remote (controlling) computer.
    Controlling the LabView application involves communicating various setpoints etc, controlling start / stop, and getting back from the application some measured data values; could be treated as file transfer or data streams.
    Will it be fruitful to look into controlling the VI over TCP/IP? I gather that support exists in LabView for sending and receiving data over TCP connections. This approach would I guess require code to be added to the existing VI to handle commands and requests on the connection; simulating the ability to interact with the front panel.
    Are other options available? I see in the help pages mention of DataSockets and web services among other approaches.
    I am totally new to LabView, so all suggestions gratefully received, but please don't assume any knowledge of LabView.

    You can control LV from other applications using the ActiveX interface from VI Server. Since you want to do this from a remote machine, you would have to enable ActiveX-access using DCOM. This is a rather worksome efford and to my experience not really suggested.
    So i suggest you to define a TCP-based protocol for remote control of your dedicated application. This of course is only valid, if the application is already running on the "server". So your "client" connects, sends commands which are executed by the "server" and data and status information is sent back. And you are correct that this will require (significant) changes to the LV application.
    Web Services are also a valid approach if you can connect to web based applications. LabVIEW utilizes RESTful Web Services architecture. REST provides a lightweight
    protocol accessible to a wide variety of clients. The architecture does not
    require complex message parsing and provides a simple interface for you to begin
    using Web Services
    in LabVIEW.
    Other methods are possible, but i recommend you to pick one of those.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Migrated Flash CS4 to another computer and it won't startup now

    Using Migration Assistant on my mac I transferred all my files to another computer. All the other Adobe programs are starting up no problem (Photoshop, Illustrator, etc.) When I try to start up Flash CS4, it just freezes with the message "copying first run files.." and then it crashes.
    I don't have the install discs unfortunately (or I would try to re-install) because this was given to me by a company I work for remotely. Any thoughts on how I can fix this? Thanks!

    I am having the same problem now - everything else migrated fine (even  Illustrator 10), but CS4 crashes on opening. I have uninstalled it and re-installed it as I do have the disks. I have deleted the preferences and .plst file as suggested in other forums. Still no luck. Hopefully someone will some day reply with an answer!!

  • Use another computer's DVD or CD drive

    Hi all.
    Both iMacs are on the same network.
    One new iMac (no optical drive!!?!). 
    One other iMac (late 2010), 10.7.5, on which I have activated System Prefs/Sharing/DVD or CD sharing.  This iMac is visible in the other's Finder window.
    I want to copy a new music CD into my iTunes library on the new iMac.  I insert the CD in the old Mac, but nothing happens:  in a Finder window, on the drive-less iMac, there is a device, in the sidebar, named "Remote Disc", however, nothing appears here.
    Am I doing something wrong?  Is the only option to get and attach an external CD drive???
    Thanks.

    Hi BDAqua.
    Sure, the CD does show up on the old iMac.  Prefs (on old iMac) are set to launch iTunes for a music CD, iPhoto for a picture CD and DVD Player for a video DVD.
    What I did to get around this problem was to copy the contents of the CD into a folder, share that folder and then I was able to access it from the new iMac.  Then I imported from the folder to iTunes (on new iMac).
    Very cumbersome.  And this might not work for all CDs/DVDs...
    I do have an external drive somewhere which I never installed.  Not even sure what kind of connection it has (FW???).  And I don't like the idea of cluttering my (physical) desktop with it...
    And there's still the problem of not knowing why the "Use another computer's DVD or CD drive" didn't work...
    (Sigh...)

Maybe you are looking for

  • Trouble writing a blocking method when asking GUI for input

    Hi, I think this is more of a thread question than a GUI question, so that is why i posted it here... My problem is I have a client/server application, and the client also has a GUI, which I get an input string from. My problem is, that I don't know

  • HT201402 storage problem with ipad

    why does my computer say that I have 20 gigabytes of tv shows, but then when I put them on my ipad they become 40 gigabytes of tv shows???

  • Disk Permissions doesn't do anything anymore.

    Hi, I have a 2X2 G5, and using disk permissions used to show a bunch of stuff I never understood, but then my computer would run smoother. Now I am having more and odd things happen, and when disk utility runs, it never finds any permissions out of p

  • Setting up a Vi to take data from ~ 25 inputs

    I am using a PCI-6033E DAQ under labview 7.1 on a PC running W 2000 and plan to take data on ~ 25 inputs , and average them for a short period of time. The objective is to get operational dfata on a large air dryer system and need pressure, temperatu

  • Strategy in task list and Strategy based Maintenance Plan

    Dear Gurus, I have some doubt about is it same if we create a single cycle plan with a task list in which maintenance strategy let say A is being used and a maintenance plan strategy based let say A and task list without any strategy can some one exp