Auto reload of Panel
Hello,
I am working on maintaining an application on swing. Every time I do a change in my Panel Class which extends JPanel, I need to stop my application and then again start it. A lot of time gets wasted in stopping and starting again as it gets called from other panel's(application workflow) etc.
Is it possible to get the Panel autoloaded after recompilation, as it happens with Servlets and jsp's.
Thanks and regards
It's not possible
Similar Messages
-
Safari 5.1 strange auto-reloading behavior for tabs in the background
hi guys.
I have been encountering this strange behavior recently. I had thought it could be something wrong with my system, until yesterday i upgraded my Safari for Windows to the v.5.1 on a Windows XP laptop, and found the same issue. Now i guess I can be quite certain this is a safari issue.
System info:
1. Macbook Pro 17", OSX 10.6.8, 64bit boot (i have 8GB RAM).
2. Safari (Mac) is the lastest version (as updated by the Auto update), run in the default 64bit mode.
3. The windows machine is an old Thinkpad T60 with Windows XP Pro SP3. The Safari for windows is Safari 5.1 (7534.50), also updated by auto update.
4. I have not installed any Safari extensions/plugs that feature an auto-reloading -- as such behavior was never seen before i upgrade to Safari 5.1
Since i mostly work on mac the mac has been kept most updated. But the windows machine which i use now and then, i don't update everything very frequently. And the earlier Safari 5.0 worked fine without the current issue.
Symptoms
1. Let's say I have 1 Safari window open with 5 tabs, and I have been working on the 4th tab for a while, and left the other 4 tabs "idling" in the background.
2. And then i want to switch to another tab: click on that tab, and that tab will come to the foreground while being automatically refreshed.
3. It looks to me this behavior happens after the inactive tabs have been idling longer than a certain period of time - then if you switch to them, they will be switched to and in the same time auto-reloaded. But I still don't know how long it needs for the "idling" before an auto-reloading "threshold" is triggered.
4. In the beginning this was just on the Mac Safari (and i hadn't updated safari on the windows). But after I updated safari for WIN yesterday, i found the same behavior today.
5. I checked all the Preferences settings and didnt find any option that indicates this behaviors.
Guys. any ideas? anyone have the same trouble? Thanks a lot guys. This is really annoying.Carolyn Samit wrote:
I'm running Safari 5.1 / SL v10.6.8 on one Mac with Glims installed and I never have a problem with tabs auto reloading. You might want to give it a try.
It's free!
http://www.machangout.com/
Once the software is installed you can access the settings from Safari / Preferences - Glims.
If you don't like the software you can use their uninstaller here.
Hi Carolyn thanks a lot for the idea.
The weird thing is... after i tried to uninstall and re-install a few apps the "auto-loading" behavior disappeared ... guess something was interfereing with safari 5.1...
But thanks for recommending Glims. I took a quick look at the website and it looks great. will do some more research before i start using it. Thanks for the recomm! -
I am running a web-based CMS that cycles through a number of pages, each for different times ( ranging from 40 seconds to 2 minutes )and is displayed in a number of shops. Every now and then our internet drops, and the page errors with connection failed. I’m wondering if there is anyway to auto reload the page as soon as the error connection failed is showing. auto-reload addon is not an option as this will interrupt the sequence.
The following error was encountered:<br />
<br />
<ul><li><b>Connection Failed</b></li></ul><br />
<br />
This means:<br />
<br />
<pre>I am running a web-based CMS that cycles through a number of pages, each for different times ( ranging from 40 seconds to 2 minutes )and is displayed in a number of shops. Every now and then our internet drops, and the page errors with connection failed. I’m wondering if there is anyway to auto reload the page as soon as the error connection failed is showing. auto-reload addon is not an option as this will interrupt the sequence.
The following error was encountered:<br />
<br />
<ul><li><b>Connection Failed</b></li></ul><br />
<br />
This means:<br />
<br />
<pre> -
I want to allow redirects but not auto-reloading
I'm running Yosemite on a Mac Air, with fully-updated everything.
I'd like to stop pages reloading without my permission. This is usually an issue for me on news sites.
In FF preferences, the option to allow or disallow auto-reloading is tied to the option to redirect. I can allow or disallow both, but not allow one and not the other.
The net effect is, my news sites aren't automatically refreshing (yay), but other sites get stuck when a page redirect comes up. I play Scrabble online; now I have to manually allow a redirect with every play. Same with following Twitter links.
Is there some way to kill off the auto-reloads while still allowing redirects? Maybe a whitelist for redirects, as a secondary option?
Thanks!I do not know if the browser can tell the difference because it depends on the DNS server to give redirect requests back to the browser. Actually it does, 301 or 302 vs new http get request.... anyway:
I found this add on: [https://addons.mozilla.org/en-us/firefox/addon/refreshblocker/ Refresh Blocker] and [https://addons.mozilla.org/en-US/firefox/addon/noredirect/?src=search No Redirect] which both let you control what sites to allow if there are only a few sites.
This would only be a temporary work around however. -
Premiere doesn't auto reload footage.
Premiere Pro CC on OSX...
I am rendering out various 3d files from cinema 4D as a PNG image sequences and I am making small changes and re-rendering them. Premiere however does not auto reload them. I have to do the replace footage to clear the cache and bring them in.
I know After effects does this properly now, but is this a premiere bug/quirk/lack of functionality? Or Is this just me?When I right-click on a file from the bin and select "Reveal in Finder," the correct file is shown. When double-click on a file, the source monitor shows the correct clip. The same goes for when a file is selected from the timeline. However, since the in and out points have been moved to a point after the clip is over, there is no video to display. So what I am wondering is: how did the in and out points get shifted, and if there is a way to fix it all at once, rather than manually changing each clip.
-
Hello all,
Like to reload different panels onto the same load panel.
Code sample below on what I'am trying to achieve
Each panel size would like to be 45% of window size.
Have problems of reloading different panels to achieve the size and
also when resizing the window
Have 8 dukes to get rid of from:
http://forum.java.sun.com/thread.jsp?forum=43&thread=431639
Thanks
Abraham Khalil
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
* Want to test reloading panels of very different text sizes inside it<br>
* The goal is no matter want the label text size is, each label panel should only
* show a maximum of 45% of the window size. <br>
* <p>
* Each button on the right will show a more uglier panel to load
public class PanelChangeTest extends JFrame implements ActionListener {
private static final int WIDTH = 640;
private static final int HEIGHT = 400;
private static final String BUTTON_PANEL_TEST1 = "Load Normal Panel";
private static final String BUTTON_PANEL_TEST2 = "Load bit ugly Panel";
private static final String BUTTON_PANEL_TEST3 = "Load very ugly Panel";
private static final String[] BUTTON_COMMANDS = {
BUTTON_PANEL_TEST1,
BUTTON_PANEL_TEST2,
BUTTON_PANEL_TEST3
private JPanel loadPanel = new JPanel();
private PanelChange[] testPanels = null;
* Model for each panel. <br>
* Each panel contain email fields of from, to, subject and cc
private class PanelFields {
private String from = null;
private String to = null;
private String subject = null;
private String cc = null;
public PanelFields(String from, String to, String subject, String cc) {
this.from = from;
this.to = to;
this.subject = subject;
this.cc = cc;
public String getFrom() {
return from;
public String getTo() {
return to;
public String getSubject() {
return subject;
public String getCC() {
return cc;
} // End PanelFields class
* View panel class <br>
* Each panel change class will contain four panels and they are from, to, cc and subject panel. <br>
* Each of the from, to, cc and subject panel contain two labels, one for description and other for
* its text value.
* Want to set each panel size to 45% of window size so it looks even, and if label text is too long
* to fit in 45% view, it should truncate it..
private class PanelChange extends JPanel {
private static final float PERCENT = 1 / 100.0f;
private static final float EACH_PANEL_SIZE = 45 * PERCENT;
private JPanel getPanel(String labelForText, String text) {
JLabel labelLeft = new JLabel(labelForText, JLabel.LEFT);
JLabel labelRight = new JLabel(text, JLabel.LEFT);
setBold(labelLeft, true);
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
panel.add(labelLeft);
panel.add(labelRight);
panel.setBorder(BorderFactory.createLineBorder(Color.blue));
return panel;
public void recalculate(Dimension parentSize) {
Dimension eachPanelSize = new Dimension((int) (parentSize.width * EACH_PANEL_SIZE), 12);
System.out.println("Parent size = (" + parentSize.width + ", " + parentSize.height + ")\n" +
"Each panel size is recalculated as (" + eachPanelSize.width + ", " + eachPanelSize.height + ")\n");
Component[] components = getComponents();
for (int eachPanel = 0 ; eachPanel < components.length ; eachPanel++) {
JComponent panel = (JComponent) components[eachPanel];
panel.setMaximumSize(eachPanelSize);
panel.setMinimumSize(eachPanelSize);
panel.setSize(eachPanelSize);
public PanelChange(PanelFields panelFields) {
JPanel fromPanel = getPanel("From: ", panelFields.getFrom());
JPanel toPanel = getPanel("To: ", panelFields.getTo());
JPanel subjectPanel = getPanel("Subject: ", panelFields.getSubject());
JPanel ccPanel = getPanel("CC: ", panelFields.getCC());
setLayout(new BorderLayout());
JPanel panel = new JPanel();
// Test with panel of GridLayout instead of GridBagLayout to see the difference...
panel.setLayout(new GridLayout(2, 2, 5, 5));
panel.add(fromPanel);
panel.add(toPanel);
panel.add(subjectPanel);
panel.add(ccPanel);
panel.setLayout(new GridBagLayout());
constrain(panel, fromPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
0, 0, 1, 1, 1.0, 0.0);
constrain(panel, toPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
1, 0, 1, 1, 1.0, 0.0);
constrain(panel, subjectPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
0, 1, 1, 1, 1.0, 0.0);
constrain(panel, ccPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
1, 1, 1, 1, 1.0, 0.0);
add(panel, BorderLayout.CENTER);
private int getFontStyle(Component component, boolean makeBold) {
int style = 0;
if (component != null) {
Font f = component.getFont();
if (f != null) {
if (f.isPlain()) style = style | Font.PLAIN;
if (f.isItalic()) style = style | Font.ITALIC;
if (makeBold) style = style | Font.BOLD;
return style;
private void setBold(Component component, boolean makeBold) {
int style = getFontStyle(component, makeBold);
Font styleFont = component.getFont().deriveFont(style);
component.setFont(styleFont);
} // End PanelChange class
public void constrain( Container container, Component component,
int fill, int anchor,
int gx, int gy, int gw, int gh, double wx, double wy ) {
GridBagConstraints c = new GridBagConstraints();
c.fill = fill;
c.anchor = anchor;
c.gridx = gx;
c.gridy = gy;
c.gridwidth = gw;
c.gridheight = gh;
c.weightx = wx;
c.weighty = wy;
( (GridBagLayout) container.getLayout() ).setConstraints( component, c );
container.add( component );
public void constrain( Container container, Component component,
int fill, int anchor,
int gx, int gy, int gw, int gh,
double wx, double wy, Insets inset ) {
GridBagConstraints c = new GridBagConstraints();
c.fill = fill;
c.anchor = anchor;
c.gridx = gx;
c.gridy = gy;
c.gridwidth = gw;
c.gridheight = gh;
c.weightx = wx;
c.weighty = wy;
c.insets = inset;
( (GridBagLayout) container.getLayout() ).setConstraints( component, c );
container.add( component );
private void initPanels() {
PanelFields okPanel = new PanelFields("Simple from...",
"[email protected]; [email protected]",
"Simple subject...",
"[email protected]; [email protected]");
PanelFields bitUglyPanel = new PanelFields("A bit ugly from................",
"[email protected]; [email protected]; [email protected]; [email protected]",
"A bit ungle subject.....................",
"[email protected]; [email protected]; [email protected]; [email protected]");
PanelFields veryUglyPanel = new PanelFields("A very very very very very " +
"very very ugly from................",
"[email protected]; [email protected]; [email protected]; [email protected], " +
"[email protected]; [email protected]; [email protected]; [email protected]",
"A very very very very very very " +
"very ungle subject.....................",
"[email protected]; [email protected]; [email protected]; [email protected]; " +
"[email protected]; [email protected]; [email protected]; [email protected]");
testPanels = new PanelChange[] {
new PanelChange(okPanel),
new PanelChange(bitUglyPanel),
new PanelChange(veryUglyPanel)
Container container = getContentPane();
container.setLayout(new BorderLayout());
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
JButton button1 = new JButton(BUTTON_PANEL_TEST1);
button1.setActionCommand(BUTTON_PANEL_TEST1);
button1.addActionListener(this);
JButton button2 = new JButton(BUTTON_PANEL_TEST2);
button2.setActionCommand(BUTTON_PANEL_TEST2);
button2.addActionListener(this);
JButton button3 = new JButton(BUTTON_PANEL_TEST3);
button3.setActionCommand(BUTTON_PANEL_TEST3);
button3.addActionListener(this);
buttonPanel.add(button1);
buttonPanel.add(Box.createHorizontalStrut(5));
buttonPanel.add(button2);
buttonPanel.add(Box.createHorizontalStrut(5));
buttonPanel.add(button3);
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new GridBagLayout());
constrain(mainPanel, loadPanel,
GridBagConstraints.BOTH, GridBagConstraints.WEST,
0, 0, 1, 1, 1.0, 1.0, new Insets(5, 5, 5, 5));
constrain(mainPanel, buttonPanel,
GridBagConstraints.NONE, GridBagConstraints.CENTER,
0, 1, 1, 1, 0.0, 0.0, new Insets(5, 5, 5, 5));
container.add(mainPanel);
private void setupLoadPanel(PanelChange panelToLoad) {
loadPanel.removeAll();
panelToLoad.recalculate(getSize());
loadPanel.add(panelToLoad);
loadPanel.revalidate();
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand();
for (int i = 0 ; i < BUTTON_COMMANDS.length ; i++) {
if (actionCommand.equals(BUTTON_COMMANDS)) {
setupLoadPanel(testPanels[i]);
break;
public PanelChangeTest() {
super("Panel change test...");
Dimension size = new Dimension(WIDTH, HEIGHT);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screenSize.width - size.width) / 2;
int y = (screenSize.height - size.height) / 2;
setBounds(x, y, WIDTH, HEIGHT);
addWindowListener(new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
FontUIResource standardFont = new FontUIResource("dialogPlain11", Font.PLAIN, 11);
UIManager.put("Label.font", standardFont);
UIManager.put("Button.font", standardFont);
initPanels();
public static void main(String args[]) {
new PanelChangeTest().setVisible(true);Please use the following code below:
Somehow it doesn't show the text if it can't fit inside the panel.
When resize to full screen, it shows the text??
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
* Want to test reloading panels of very different text sizes inside it<br>
* The goal is no matter want the label text size is, each label panel should only
* show a maximum of 45% of the window size. <br>
* <p>
* Each button on the right will show a more uglier panel to load
public class PanelChangeTest extends JFrame implements ActionListener {
private static final int WIDTH = 640;
private static final int HEIGHT = 400;
private static final String BUTTON_PANEL_TEST1 = "Load Normal Panel";
private static final String BUTTON_PANEL_TEST2 = "Load bit ugly Panel";
private static final String BUTTON_PANEL_TEST3 = "Load very ugly Panel";
private static final String[] BUTTON_COMMANDS = {
BUTTON_PANEL_TEST1,
BUTTON_PANEL_TEST2,
BUTTON_PANEL_TEST3
private JPanel loadPanel = new JPanel();
private PanelChange[] testPanels = null;
* Model for each panel. <br>
* Each panel contain email fields of from, to, subject and cc
private class PanelFields {
private String from = null;
private String to = null;
private String subject = null;
private String cc = null;
public PanelFields(String from, String to, String subject, String cc) {
this.from = from;
this.to = to;
this.subject = subject;
this.cc = cc;
public String getFrom() {
return from;
public String getTo() {
return to;
public String getSubject() {
return subject;
public String getCC() {
return cc;
} // End PanelFields class
* View panel class <br>
* Each panel change class will contain four panels and they are from, to, cc and subject panel. <br>
* Each of the from, to, cc and subject panel contain two labels, one for description and other for
* its text value.
* Want to set each panel size to 45% of window size so it looks even, and if label text is too long
* to fit in 45% view, it should truncate it..
private class PanelChange extends JPanel {
private static final float PERCENT = 1 / 100.0f;
private static final float EACH_PANEL_SIZE = 45 * PERCENT;
public PanelChange(PanelFields panelFields) {
JPanel fromPanel = getPanel("From: ", panelFields.getFrom());
JPanel toPanel = getPanel("To: ", panelFields.getTo());
JPanel subjectPanel = getPanel("Subject: ", panelFields.getSubject());
JPanel ccPanel = getPanel("CC: ", panelFields.getCC());
setLayout(new BorderLayout());
JPanel panel = new JPanel();
// Test with panel of GridLayout instead of GridBagLayout to see the difference...
panel.setLayout(new GridLayout(2, 2, 5, 5));
panel.add(fromPanel);
panel.add(toPanel);
panel.add(subjectPanel);
panel.add(ccPanel);
panel.setLayout(new GridBagLayout());
constrain(panel, fromPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
0, 0, 1, 1, 1.0, 0.0);
constrain(panel, toPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
1, 0, 1, 1, 1.0, 0.0);
constrain(panel, subjectPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
0, 1, 1, 1, 1.0, 0.0);
constrain(panel, ccPanel,
GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST,
1, 1, 1, 1, 1.0, 0.0);
add(panel, BorderLayout.CENTER);
public void recalculate(Dimension parentSize) {
Dimension eachPanelSize = new Dimension((int) (parentSize.width * EACH_PANEL_SIZE), 20);
System.out.println("Parent size = (" + parentSize.width + ", " + parentSize.height + ")\n" +
"Each panel size is recalculated as (" + eachPanelSize.width + ", " + eachPanelSize.height + ")\n");
JPanel mainPanel = (JPanel) getComponent(0);
Component[] components = mainPanel.getComponents();
for (int eachPanel = 0 ; eachPanel < components.length ; eachPanel++) {
JComponent panel = (JComponent) components[eachPanel];
panel.setMaximumSize(eachPanelSize);
panel.setMinimumSize(eachPanelSize);
panel.setPreferredSize(eachPanelSize);
private JPanel getPanel(String labelForText, String text) {
JLabel labelLeft = new JLabel(labelForText, JLabel.LEFT);
JLabel labelRight = new JLabel(text, JLabel.LEFT);
setBold(labelLeft, true);
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
panel.add(labelLeft);
panel.add(labelRight);
panel.setBorder(BorderFactory.createLineBorder(Color.blue));
return panel;
private int getFontStyle(Component component, boolean makeBold) {
int style = 0;
if (component != null) {
Font f = component.getFont();
if (f != null) {
if (f.isPlain()) style = style | Font.PLAIN;
if (f.isItalic()) style = style | Font.ITALIC;
if (makeBold) style = style | Font.BOLD;
return style;
private void setBold(Component component, boolean makeBold) {
int style = getFontStyle(component, makeBold);
Font styleFont = component.getFont().deriveFont(style);
component.setFont(styleFont);
} // End PanelChange class
public void constrain( Container container, Component component,
int fill, int anchor,
int gx, int gy, int gw, int gh, double wx, double wy ) {
GridBagConstraints c = new GridBagConstraints();
c.fill = fill;
c.anchor = anchor;
c.gridx = gx;
c.gridy = gy;
c.gridwidth = gw;
c.gridheight = gh;
c.weightx = wx;
c.weighty = wy;
( (GridBagLayout) container.getLayout() ).setConstraints( component, c );
container.add( component );
public void constrain( Container container, Component component,
int fill, int anchor,
int gx, int gy, int gw, int gh,
double wx, double wy, Insets inset ) {
GridBagConstraints c = new GridBagConstraints();
c.fill = fill;
c.anchor = anchor;
c.gridx = gx;
c.gridy = gy;
c.gridwidth = gw;
c.gridheight = gh;
c.weightx = wx;
c.weighty = wy;
c.insets = inset;
( (GridBagLayout) container.getLayout() ).setConstraints( component, c );
container.add( component );
private void initPanels() {
PanelFields okPanel = new PanelFields("Simple from...",
"[email protected]; [email protected]",
"Simple subject...",
"[email protected]; [email protected]");
PanelFields bitUglyPanel = new PanelFields("A bit ugly from................",
"[email protected]; [email protected]; [email protected]; [email protected]",
"A bit ungle subject.....................",
"[email protected]; [email protected]; [email protected]; [email protected]");
PanelFields veryUglyPanel = new PanelFields("A very very very very very " +
"very very ugly from................",
"[email protected]; [email protected]; [email protected]; [email protected], " +
"[email protected]; [email protected]; [email protected]; [email protected]",
"A very very very very very very " +
"very ungle subject.....................",
"[email protected]; [email protected]; [email protected]; [email protected]; " +
"[email protected]; [email protected]; [email protected]; [email protected]");
testPanels = new PanelChange[] {
new PanelChange(okPanel),
new PanelChange(bitUglyPanel),
new PanelChange(veryUglyPanel)
Container container = getContentPane();
container.setLayout(new BorderLayout());
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
JButton button1 = new JButton(BUTTON_PANEL_TEST1);
button1.setActionCommand(BUTTON_PANEL_TEST1);
button1.addActionListener(this);
JButton button2 = new JButton(BUTTON_PANEL_TEST2);
button2.setActionCommand(BUTTON_PANEL_TEST2);
button2.addActionListener(this);
JButton button3 = new JButton(BUTTON_PANEL_TEST3);
button3.setActionCommand(BUTTON_PANEL_TEST3);
button3.addActionListener(this);
buttonPanel.add(button1);
buttonPanel.add(Box.createHorizontalStrut(5));
buttonPanel.add(button2);
buttonPanel.add(Box.createHorizontalStrut(5));
buttonPanel.add(button3);
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new GridBagLayout());
constrain(mainPanel, loadPanel,
GridBagConstraints.BOTH, GridBagConstraints.WEST,
0, 0, 1, 1, 1.0, 1.0, new Insets(5, 5, 5, 5));
constrain(mainPanel, buttonPanel,
GridBagConstraints.NONE, GridBagConstraints.CENTER,
0, 1, 1, 1, 0.0, 0.0, new Insets(5, 5, 5, 5));
container.add(mainPanel);
private void setupLoadPanel(PanelChange panelToLoad) {
loadPanel.removeAll();
Dimension parentSize = getSize();
panelToLoad.recalculate(parentSize);
loadPanel.add(panelToLoad);
loadPanel.revalidate();
loadPanel.repaint();
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand();
for (int i = 0 ; i < BUTTON_COMMANDS.length ; i++) {
if (actionCommand.equals(BUTTON_COMMANDS)) {
setupLoadPanel(testPanels[i]);
break;
public PanelChangeTest() {
super("Panel change test...");
Dimension size = new Dimension(WIDTH, HEIGHT);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screenSize.width - size.width) / 2;
int y = (screenSize.height - size.height) / 2;
setBounds(x, y, WIDTH, HEIGHT);
addWindowListener(new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
FontUIResource standardFont = new FontUIResource("dialogPlain11", Font.PLAIN, 11);
UIManager.put("Label.font", standardFont);
UIManager.put("Button.font", standardFont);
initPanels();
public static void main(String args[]) {
new PanelChangeTest().setVisible(true); -
Every time I move between tabs on safari on my ipad, the page auto reloads. How do I disable this feature. Extremely frustrating because of reload when out of wifi zone, I waste time reloading on slow 3G networks and it also increases my bandwidth consumption. Kindly help with very annoying feature
It's even worse than that. When it reloads, if you were typing data in a form, such as the reply that I'm writing Right Now, Safari wipes out all your input and you get to start from scratch. That means you can't switch between browser tabs to research whatever it is you are typing.
It wouldn't even be that hard. Most such things are fairly simple HTML "forms", all it would need to do is store the content of those "form" fields when you tab away. So if it had to reload, it could repopulate your entered data from that. Forms are very simple, just any number of pairs of {fieldname, fieldcontent}. For instance the fieldname might be "Text" and the fieldcontent might be what you are reading right now. Preserving the state of this form I am entering here would take less than 1 kilobyte (0.001 megabytes). -
Is it possible to disable auto reloading, permanently, for one specific URL?
msnbc.com is supposed to auto-reload its home page every however often, 30 minutes I think. But the reload never stops, probably because of my AdBlock settings for the site. I want to permanently stop msnbc.com from reloading. I've searched thoroughly with many keywords, and though I've found many extensions that will reload pages or set auto-reload intervals, I can't find anything that *stops* auto-reload. I'd appreciate any help.
Mike,
Not sure if I completely understand your dilema. I don't know of any way to pause a FMR, however, I may be able to help with plan B. I have a widget called Repo Playbar that allows you to reposition the playbar AND show/hide any playbar buttons, including the play/pause button. Have a look here.
HTH,
Jim Leichliter -
Seems like this problem appeared quite often, nevertheless i spent an hour in search of an answer surfing the net, alas, nothing..
Problem: since today Safari started to reload almost every single page whenever i switch between tabs or sometimes even while im stil on the page. Fot example - i'm watching a movie, stoped it - switched to facebook tab to reply to my friend, then back to the tab with the video & no sooner i get back as the page with video auto-refreshes itself & i have to load movie again & look for the place i stoped watching the video to continue!
Device & program version: Macbook Pro, bought in july, Safari Version 5.1 (6534.50), No extensions or apps installed, & pls dont' say that it happens on particular pages, i visited the same ones yesterday & everything was ok, since today it's working all weird, and happens within all pages. But in the same time no system - once it reloads the page, other time im switching between the same very tabs it doesn't.
This is unacceptable & completely useless. Why there are no comments from Apple or Safari team, as if the problem doesnt exist? Not speaking of the problem solving process or tips.
Please, if someone knows how to stop this nightmare - tell me!!
Apple-team, I would love to hear your comments & in fact receive some help and get this problem fixed.. :\
(P.S. - person with the same problem posted a message year before, no effective reply.. - https://discussions.apple.com/thread/2356901?start=0&tstart=0 )
Sincerily yours,
Tatevik
<Email Edited by Host>Macbook Pro, bought in july
If your Mac is runing Lion v10.7 try disabling Resume.
How To Disable Lion's 'Resume' Feature - MacRumors.com -
Why can't we disable auto-reloading without having the nag bar every time it does its job?
Blocking page reloading (or auto-refresh) and being "warned" about a blocked page reload, should be two, separate items in Prefs, or config. Period. If someone wants to be "alerted" or "warned" every time their settings are acted-upon, so be it, they can choose to be warned. As it stands, the only way to block the annoying auto-refresh, is to choose the annoying nag.
Where is the logic in that? What next? Maybe we should have an alert every time a new tab or window opens, that says, "Firefox just loaded a page you requested."
Why not follow the structure, already established, over and over, in Firefox's preferences, whereby a user can make one choice, and then there are sub-items that can also be chosen, or not chosen? (i.e., 1-Accept cookies from sites (check, or no check), a) Accept third-party cookies (select from Always, From-visted, or Never)?hello, this is a primarily community-run support forum so it's probably not the right place to request features (we cannot implement any features & devs won't read here).
please either use https://input.mozilla.org/feedback for general feedback or if you feel that it's a missing feature in the browser file a bug at bugzilla.mozilla.org. -
Auto Reload/Refresh of page or content
I am a newb to Edge Animate and coding in general. I am developing a mobile web page with text on it. I need to update the text and have users see the updated text without having to reload/refresh the page themselves. Is there a way to have the page auto-refresh or another way to ensure people see the updated text if they already have the page loaded on their device?
Hi Friend,
Use Javascript utility for auto-refresh the page.
Following example will be helpful to you:
<html>
<head>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
alert("hi")
// -->
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
<p>This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.</p>
<p>But hey, try not to annoy your users too much with unnecessary page refreshes every few seconds!</p>
</body>
</html>
Enjoy RIA -
Can I make cluster servers auto reload html files without redeploy applications?
For example, I have some html files under application directory, these html
files were
generated and synchronized to all clustered servers by other external
programsfrom time to time¡£ But with weblogic, I have to redeploy these html
files to enable these files been viewed via browser.
Is there any way to let weblogic auto refresh these files without redeploy?
OS X Lion- About Auto Save and Versions
Handles this automatically. Otherwise, such frequent backups will overtax the drive and probably cause some slowdowns, but you can change the interval using the freeware utility, TimeMachineEditor 3.0.3. -
How to Save & reload front panel position
I would like to save the front panel position into an ini file or registry, so that the next time the program is used, it comes up where the user left it.
With the Invode Method: Front Panel.Run-Time postition.Get positon
I can get all the position data I want:
left-top
state
monitor
However... How do I set the same information at startup?
There's no Front Panel.Run-Time Position.Set position. as far as I can see...
To set position, state and monitor values, it seems I need to first call FP.Open for the state, then FP.Run-Time Position.Centered to select the monitor, and then FP.Run-Time Position.Custom to set the position....
That looks weird and complicated... Am I missing something here? Is there a more elegant approach?NI explains the difference between Property nodes and Invoke nodes as this.
Property nodes access the properties of an object and allow you to read/write those properties.
Invoke nodes perform actions on an application or VI allowing you to get and sometimes set attributes of those actions.
Sometimes there is some overlap between Properties and Methods as you noticed with the "Get Position" method and the "Panel.Position" property. But most of the Methods do not have a similar Property. For instance, there is a Method you can use on a front panel item called "Get Image". This will return image data about the item that will let you save the items current visual appearance to a graphics file. (.bmp, .png, .jpg) There is no equivalent property to do this.
So it really depends on what you are trying to do as to which one you end up using.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences. -
Auto reload ALV list display.
Hi,
Anyone has any idea, i am require to auto re-load my ALV list with new data after regular interval.
I am using REUSE_ALV_LIST_DISPLAY FM
Thanks,
Ad.Vijay is right. Here is a sample program, I'm using a custom database table to show in the ALV list. I couldn't seem to get this working using the "REFRESH" fucntionality that I believe to be built in, so I am using the "EXIT" instead. Its working.
Also, this sample uses a local implementation of the class CL_GUI_TIMER. REason for this is, I'm on a 46c system and that class does not exist. I copied the class out of another box and make it a local class.
report zrich_0002.
type-pools : slis.
data: begin of itab occurs 0.
include structure zhrpttrk.
data: end of itab.
* CLASS lcl_gui_timer DEFINITION
class lcl_gui_timer definition inheriting from cl_gui_control.
public section.
constants: eventid_finished type i value 1 .
class-data: interval type i value '0'.
events: finished .
methods:
cancel
exceptions
error,
constructor
importing
lifetime type i optional
value(shellstyle) type i optional
value(parent) type ref to cl_gui_container optional
exceptions
error,
run
exceptions
error,
dispatch redefinition.
endclass.
* CLASS lcl_event_handler DEFINITION
class lcl_event_handler definition.
public section.
class-methods: on_finished for event finished of lcl_gui_timer.
endclass.
data: gui_timer type ref to lcl_gui_timer.
data: event_handler type ref to lcl_event_handler.
data: timeout type i value '3'.
data: flag(1) type c.
parameters : p_check type c.
start-of-selection.
create object gui_timer.
set handler event_handler->on_finished for gui_timer.
gui_timer->interval = timeout.
call method gui_timer->run.
flag = 'X'.
while flag = 'X'.
clear flag.
perform write_list.
endwhile.
* FORM alv_user_command
form alv_user_command using r_ucomm type sy-ucomm
rs_selfield type slis_selfield.
* rs_selfield-refresh = 'X'.
rs_selfield-exit = 'X'.
if r_ucomm = 'REFR'.
flag = 'X'.
endif.
endform.
* FORM write_list
form write_list.
data: fieldcat type slis_t_fieldcat_alv.
data: repid type sy-repid.
repid = sy-repid.
* Use your own database table here.
select * from zhrpttrk into table itab.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = repid
i_internal_tabname = 'ITAB'
i_inclname = repid
changing
ct_fieldcat = fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
it_fieldcat = fieldcat
i_callback_program = repid
i_callback_user_command = 'ALV_USER_COMMAND'
tables
t_outtab = itab
exceptions
program_error = 1
others = 2.
endform.
* CLASS lcl_gui_timer IMPLEMENTATION
class lcl_gui_timer implementation.
method constructor.
type-pools: sfes.
data clsid(80).
data event_tab type cntl_simple_events.
data event_tab_line type cntl_simple_event.
if clsid is initial.
data: return,
guitype type i.
guitype = 0.
call function 'GUI_HAS_OBJECTS'
exporting
object_model = sfes_obj_activex
importing
return = return
exceptions
others = 1.
if sy-subrc ne 0.
raise error.
endif.
if return = 'X'.
guitype = 1.
endif.
if guitype = 0.
call function 'GUI_HAS_OBJECTS'
exporting
object_model = sfes_obj_javabeans
importing
return = return
exceptions
others = 1.
if sy-subrc ne 0.
raise error.
endif.
if return = 'X'.
guitype = 2.
endif.
endif.
case guitype.
when 1.
clsid = 'Sapgui.InfoCtrl.1'.
when 2.
clsid = 'com.sap.components.controls.sapImage.SapImage'.
endcase.
endif.
call method super->constructor
exporting
clsid = clsid
shellstyle = 0
parent = cl_gui_container=>default_screen
autoalign = space
exceptions others = 1.
if sy-subrc ne 0.
raise error.
endif.
call method cl_gui_cfw=>subscribe
exporting
shellid = h_control-shellid
ref = me
exceptions others = 1.
if sy-subrc ne 0.
raise error.
endif.
* Register the events
event_tab_line-eventid = lcl_gui_timer=>eventid_finished.
append event_tab_line to event_tab.
call method set_registered_events
exporting
events = event_tab.
endmethod.
method cancel.
call method call_method
exporting
method = 'SetTimer'
p_count = 1
p1 = -1
queue_only = 'X'
exceptions others = 1.
if sy-subrc ne 0.
raise error.
endif.
endmethod.
method run.
call method call_method
exporting
method = 'SetTimer'
p_count = 1
p1 = interval
queue_only = 'X'
exceptions others = 1.
if sy-subrc ne 0.
raise error.
endif.
endmethod.
method dispatch .
case eventid.
when eventid_finished.
raise event finished.
endcase.
endmethod.
endclass.
* CLASS lcl_event_handler IMPLEMENTATION
class lcl_event_handler implementation.
method on_finished.
* Start Timer again
gui_timer->interval = timeout.
call method gui_timer->run.
* cause PAI
call method cl_gui_cfw=>set_new_ok_code
exporting
new_code = 'REFR'.
endmethod.
endclass.
Regards,
Rich Heilman -
LV8.0 Auto-print front panel doesn't work
On the front panel in VI Properties/Print Options the 'Automatically print front panel every time VI completes execution' is cleared when you exit the VI Properties dialog and return to it. Consequently, you can't get the front panel to print by checking this option.
BrentBshu,
You're absolutely right. That functionality is faulty. A work around may be to use the operate>>print at completion function. FYI: if you enable this property, the VI Properties/Print Options the 'Automatically print front panel every time VI completes execution' turns black. R&D is aware of both of these problems. Thank you for you're very valuable feedback and post to let us know if there's anything else we can help out with.
Best Regards,
Chris C
Applications Engineering
National Instruments
Chris Cilino
National Instruments
LabVIEW Product Marketing Manager
Certified LabVIEW Architect
Maybe you are looking for
-
Program times out while looping at internal table with huge records - Needs fine tuning suggestions
Hi, I am trying to execute a report. It times out while looping at vbap internal table. This internal table has 140000 records and does the validation within this loop and geenrates data for the output. Due to this huge volume, the program times out
-
I cant connect to the network when Im on windows 8!
-
I was just wondering if someone could email me my photoshop elements serial number?
I didnt get the chance to register my product and the cd cover was tossed while cleaning. I want to get the number in the event I switch computers in the near future. What can I do?
-
Hi, I hope this is the right section. Couldn't find a dedicated Mail one. I have just reinstalled everything to get my MacBook Pro running 10.8. When I open Mail I get a list of emails, which is fine. But I used to have the window split 50/50 with th
-
Photoshop CS6 3D menu grey out
Hi everyone. I am now trying to use photoshop CS6 3D features. And I found out that no matter what I select, the 3D menu is still grey out. What should I do to solve this? I see some of you said that your 3D menu is missing because of the graphic car