refresh

java refreshing an array into jList

旧巷老猫 提交于 2019-12-01 05:26:51
OK so I have a JList and the content is provided with an array. I know how to add elements to an array but I want to know how to refresh a JList... or is it even possible? I tried Google. :\ import java.applet.Applet; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class bs extends JApplet implements MouseListener { public static String newline; public static JList list; public void init() { String[] data = {"one", "two", "three", "four"}; list = new JList(data); this.getContentPane().add(list); list.addMouseListener(this); String newline = "\n"; list.setVisible(true);

How to force refresh the DataGridView's content?

此生再无相见时 提交于 2019-12-01 04:08:37
问题 I want to make a sorted datagridview input. The following code snippet doesn't quite cut it; even if i put a grd.Refresh, the datagridview doesn't show its updated values. If i press arrow down key and go up again, the grid is refreshing. Is there any other way i can force refresh to datagridview's content? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace

java refreshing an array into jList

醉酒当歌 提交于 2019-12-01 03:27:39
问题 OK so I have a JList and the content is provided with an array. I know how to add elements to an array but I want to know how to refresh a JList... or is it even possible? I tried Google. :\ import java.applet.Applet; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class bs extends JApplet implements MouseListener { public static String newline; public static JList list; public void init() { String[] data = {"one", "two", "three", "four"}; list = new JList(data); this

Detect browser refresh

时光毁灭记忆、已成空白 提交于 2019-12-01 03:24:40
问题 How can I find out if the user pressed F5 to refresh my page (Something like how SO implemented. If you refresh your page, the question counter is not increased). I have tested many code snippets mentioned in a dozen of tutorials, but none worked correctly. To be more clear, suppose that i have an empty web form and would like to detect whether the user has pressed F5 in client-side (causing a refresh not submit) or not. I can use session variables, but if the user navigates to another page

How do I disable the F5 refresh on the browser?

懵懂的女人 提交于 2019-12-01 02:41:06
问题 Preferably using JavaScript but would like to hear other ways too 回答1: This will disable F5, but not the actual refresh function: document.onkeydown = function (e) { if (e.keyCode === 116) { return false; } }; On Chrome/XP, at least. 回答2: Write a series of browser extensions which remove refresh functionality. Require in your Terms of Use that your users install (and use) your extension. Prosecute for non-compliance. Profit! (?) 回答3: Actually, you can.. This little routine fixed it all for me

jQuery Mobile: Uncaught cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'

元气小坏坏 提交于 2019-12-01 02:20:52
问题 I am pulling my hair out dealing with this problem. These are the code that I used and caused the mentioned problem. $(document).ready(function () { $("#at-site-btn").bind("tap", function () { $.mobile.changePage("view/dialog/at-site.php", { transition:"slidedown", role:"dialog" }); }); $('#at-site-page').live('pagecreate', function(){ var $checked_emp = $("input[type=checkbox]:checked"); var $this = $(this); var $msg = $this.find("#at-site-msg"); $checked_emp.appendTo($msg); $checked_emp

forece refresh client page from server side [closed]

拈花ヽ惹草 提交于 2019-12-01 01:18:26
How may I refresh current client view page from the server side? for example, if I want to force refresh for page that is viewing now for all the clients, so they can view the new content. and I want to do this refresh in the time that I want using PHP. Is it possible?? Use Web Sockets. You can use either PHP Sockets with this or this I think php Sockets would require you to have a PHP version of 5.3 or above. If you don't have PHP v5.3 or above you can use Node JS with Socket.io Long Pooling is also one of the option, but that won't be a good solution considering the number of requests your

Is there a difference between an F5 browser refresh and postback??(asp.NET)

六月ゝ 毕业季﹏ 提交于 2019-12-01 00:59:08
I am dynamically creating dragrids in different rows of an existing datagrid in asp.NET My generated datagrids have a column which is TemplateColumn (a CheckBox Column). In my parent datagrid, I have a template column with checkboxes. when I check or uncheck the value of the check box, the check_change method is called (autopostback is set to true), the dynamically generated datagrids lose the checked checkboxes (the checkboxes are all unchecked again). However, if i check any of the checkboxes of the child (dynamically generated) grids and press F5, it refreshes the page but still I have my

Vaadin 8 : reload grid with data from server every 1min

删除回忆录丶 提交于 2019-12-01 00:04:59
I am trying to have a auto refresh feature for the grid which basically, updates the grid with latest data from the server every 'n' seconds. I was able to implement the PollListner whenever the user enables Auto-Refresh. UI ui= TestUI.getCurrent(); Boolean value = isRefreshChkBox.getValue(); PollListener listener = e -> { explorer.reloadUI(); }; if (value) { String refreshRateValue = refreshRateTxtField.getValue(); int refreshRate = Integer.valueOf(refreshRateValue); int millis = (int) TimeUnit.SECONDS.toMillis(refreshRate); absUI.setPollInterval(millis); absUI.addPollListener(listener); }

GWT detect browser refresh in CloseHandler

一曲冷凌霜 提交于 2019-11-30 23:46:27
I have a GWT application and I want to run some code when the user leaves the application to force a logout and remove any data etc. To do this I am using a CloseHandler and registering it using Window.addCloseHandler. I have noticed that when the refresh button is clicked the onClose method is run but I have been unable to differentiate this event from a close where the user has closed the browser. If it is a refresh I do not want to do the logout etc, I only want to do this when the user closes the browser/tab or navigates away from the site. Does anybody know how I can do this? There is no