Page palette appears to be very strange in Indesign (and don't know how to fix it)
So one day, my Page Palette just went cuckoo in Indesign.The bottom area, where you can normally delete, add, or shows you how many pages there are, or the very lower right scretch corner are all missing. I've tried to go to Palette options and see it is a "View" issue, but nothing seems to bring those functions back.
This could either be something Very simple and I am an idiot, or it is something alot more major, which I am praying it's not.
Thanks, any insights is great apperciated!!
Replace your preferences. This link is for CS4, and it looks like you have CS2, but the information is basically the same. Read the whole page.
Adobe InDesign CS4 * Setting preferences
Similar Messages
-
I plug my iphone 3gs into my laptop and it no longer syncs with my iTunes. I've tried all the trouble shooting methods and nothing works. My iPhone doesn't appear on iTunes or under "My Computer." Does anyone know how to fix this?
If AMDS is running, you are using a USB port directly on the computer and not a hub, you have disconnected other USB devices except keyboard and mouse, you have completely uninstalled and reinstalled iTunes as described in http://support.apple.com/kb/HT1925, You have tried cleaning the connector on the bottom of the phone, you have tried a different cable, you have installed the latest USB drivers for your computer, you have disabled your antivirus and firewall, you are running as an Administrator account and you have tried creating a new user on your computer and connected when logged in as that user then you have exhausted my knowledge. The only other thing to try is a different computer. If it isn't recognized on a different computer you have a hardware problem. Good luck!
-
Hello, I'm Bethany and I'm having trouble with my apple ID I tried to buy something from he app store and they assed me some questions and anyway i have locked my account and don't know how to unlock any help with be very helpful thanks.
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
Any time I click on a link this happens, it's very frustrating! The only time the link opens correctly is when I open my bookmarks in new tabs or windows. Nothing else loads.
This issue can be caused by an extension that isn't working properly.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
I have an Apple16GB with BT Yahoo home page which had a box for mail and weather and further down I had my local weather, I have touched something and lost these boxes and my home page has changed and I would like to get it back as it was. I have to admit to being useless at computers although I love my I Pad.
Is this the website that you are looking for? According to the very little bit of research that I did on this before responding to you, there have been changes made to the website and to the way that works ...if I read everything correctly.
http://home.bt.com/
Did you have a shortcut to the website on your iPad home screen? If that is what you want to create again, navigate to that website in Safari and then tap the arrow icon next to the address/URL field at the top of the Safari toolbar. Form the window that will pop up, select - Add to Home Screen. That will put an icon on your home screen that will allow you to open directly to that page in Safari when you tap on it. -
I'm not sure if I permanently blocked this? I can't bring up
mozilla/firefox even though my default browser. Obviously I'm
not very good with this stuff. Need to find out how to restore
it.
Unable to connect
Firefox can't establish a connection to the server at www.mozilla.com.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.hello , i did exactly the same thing , and my app store icon look like this :
http://i.imgur.com/FIrph.png
so can you tell me how did your friend send the app store for you? please -
how can you get the line that has file edit bookmarks history on it back when it disapears
Firefox 3.6 versions allow the user to turn-off the Menu Bar. Several ways to re-display the Menu Bar below.
'''<u>Menu Bar</u>''' (File, Edit, View, History, Bookmarks, Tools, Help) , see: <br/>
http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
* Press F10, Menu bar will appear, click View, click Toolbars, click Menu bar
* Press ALT, the Menu bar will appear, click View, click Toolbars, click Menu bar<br />
* Hold down the ALT button while pressing V+T+M
'''<u>Navigation Toolbar</u>''' (Back/forward, Refresh...Home, URL/Location Bar, Search Bar): Do one of the following
#click View > Toolbars, click on "Navigation Toolbar" to place a check mark, OR#right-click the Menu Bar, click "Navigation Toolbar" to place a check mark. See: <br />
#*https://support.mozilla.com/en-US/kb/Back+and+forward+or+other+toolbar+items+are+missing
#*http://support.mozilla.com/en-US/kb/How+to+customize+the+toolbar
#*http://kb.mozillazine.org/Toolbar_customization
#*http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
#*http://support.mozilla.com/en-US/kb/Navigation+Toolbar+items
'''<u>Bookmarks Toolbar</u>''': Same procedure as Navigation Bar except click "Bookmarks Toolbar".<br />
'''<u>Status Bar</u>''': click View, click Status Bar to place a check mark<br />
'''<u>Full Screen Mode</u>''': If you have no Toolbars or Tab Bar: Press F11 (F11 is an on/off toggle). See: http://kb.mozillazine.org/Netbooks#Full_screen<br />
Also see: http://kb.mozillazine.org/Toolbar_customization_-_Firefox#Restoring_missing_menu_or_other_toolbars
<br />
The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post.
*Adobe PDF Plug-In For Firefox and Netscape
**New Adobe Reader X (version 10) with Protected Mode released 2010-11-19
**See: http://www.securityweek.com/adobe-releases-acrobat-reader-x-protected-mode
*Shockwave Flash 10.1 r53
*Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
#'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
#*'''Note: plugin check page does not have information on all plugin versions'''
#'''Update Adobe Reader (PDF plugin):'''
#*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
#**Open the Adobe Reader program from your Programs list
#**Click Help > Check for Updates
#**Follow the prompts for updating
#**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
#*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
#**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
#**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
#**Click "Save to File"; save to your Desktop (so you can find it)
#**After download completes, close Firefox
#**Click the installer you just downloaded and allow the install to continue
#***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
#**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
#***Choose your OS
#***Choose the latest #.x version (example 9.x, for version 9)
#***Choose the highest number version listed
#****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
#***Choose your language
#***Download the file
#***Windows: choose the .exe file; Mac: choose the .dmg file
#*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
#**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
#**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
#*After the installation, start Firefox and check your version again.
#'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
#*Download and SAVE to your Desktop so you can find the installer later
#*If you do not have the current version, click on the "Player Download Center" link on the "Download..." page below
#*After download is complete, exit Firefox
#*Click on the installer you just downloaded and install
#**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
#*Start Firefox and check your version again or test the installation by going back to the download link below
#*Download and information: http://www.adobe.com/software/flash/about/
#**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
#**Use IE to go to the above site to update the IE ActiveX
#Update the [[Java]] plugin to the latest version.
#*Download site: http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
#*Also see "Manual Update" in this article: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
#* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
#* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org
#*Java Test: http://www.java.com/en/download/help/testvm.xml -
I am trying to scan multiple pages from my scanner using a Mac and don't know how to
Hi there,
I am trying to scan multiple pages using HP Deskjet 3070A (Print Scan Copy) and it is all wireless using a Mac OSX 10.6 Snow Leopard and it won't let me. And I am trying to send this document via email.
Can you offer advice as to how I can do this.
Much appreciated.
This question was solved.
View Solution.Hi,
Please refer manual for the printer and page 26 from link below.
Although I am an HP employee, I am speaking for myself and not for HP.
--Say "Thanks" by clicking the Kudos Star in the post that helped you.
--Please mark the post that solves your problem as "Accepted Solution" -
How do I enlarge the print?
See this:
https://support.mozilla.com/en-US/kb/Page+Zoom
The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
Try the Default FullZoom Level extension: <br />
https://addons.mozilla.org/en-US/firefox/addon/6965
Or the NoSquint extension: <br />
https://addons.mozilla.org/en-US/firefox/addon/2592/ -
I'm not very computer savvy. I don't know how to install my new printer--PIXMA MP490
How can I get help installing my new printer? It's a PIXMA MP490.
Hi tada!
To have a better understanding of your issue, please let everyone know what operating system (Windows XP/Vista/7/8 or OS 10.X) you are using. That way, community will be able to assist you with suggestions appropriate for your product.
If this is an urgent support need, please CLICK HERE to reach our friendly Technical Support Team by phone or email.
Thanks! -
Error 1009 keeps appearing and i don't know how to fix it?
TypeError: Error #1009: Cannot access a property or method of a null object reference.
::MainTimeline/my_guess()
how can i fix this?The 1009 error indicates that one of the objects being targeted by your code is out of scope. This could mean that the object....
- is declared but not instantiated
- doesn't have an instance name (or the instance name is mispelled)
- does not exist in the frame where that code is trying to talk to it
- is animated into place but is not assigned instance names in every keyframe for it
- is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved. -
Can't figure why my MAC, which I thought was on my iCloud account doesn't show up with the list of devices when I look up my iCloud on my iPhone. I thought that it was included and set up for iClouid back up, but now am not sure. Can't figure out how to get it on iCloud if it isn't. Thanks
What system are you running on your Mac? Does it meet the requirements listed in this Apple doucment: iCloud: System requirements
Happy Holidays -
Quickbooks reports will not print. I think it has something to do with Adobe/Pages \but I don't know how to fix the issue. Help!
I don't see how it could have anything to do with any Adobe app or Pages. QuickBooks is its own thing and does not rely on any other apps to print.
I opened a couple of random reports and had no trouble sending it to a laser printer. Also no issue saving them to text file, or clicking the Export button at the top right of the report and having it open directly into Excel.
What exactly are you trying to accomplish, and what is failing? -
my 2009 macbookpro has begun running very slowly, apps freeze and pages hang ... i've run EtreCheck and there are problems but don't know how to sort ... ran CleanMyMac and freed up about 30GB of space but didn't help ... ran AdwareMedic so that's been sorted but the other issues that came up on the EtreCheck I need help with however i can't figure out how to paste the results on this page
thanks thomas ... here it comes
EtreCheck version: 2.1.5 (108)
Report generated December 29, 2014 at 5:03:07 PM GMT
Click the [Support] links for help with non-Apple products.
Click the [Details] links for more information about that line.
Click the [Adware] links for help removing adware.
Hardware Information: ℹ️
MacBook Pro (17-inch, Early 2009) (Verified)
MacBook Pro - model: MacBookPro5,2
1 2.66 GHz Intel Core 2 Duo CPU: 2-core
4 GB RAM Upgradeable
BANK 0/DIMM0
2 GB DDR3 1067 MHz ok
BANK 1/DIMM0
2 GB DDR3 1067 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en1: 802.11 a/b/g/n
Video Information: ℹ️
NVIDIA GeForce 9400M - VRAM: 256 MB
Color LCD 1920 x 1200
NVIDIA GeForce 9600M GT - VRAM: 512 MB
System Software: ℹ️
OS X 10.9.5 (13F34) - Uptime: 0:5:36
Disk Information: ℹ️
FUJITSU MHZ2320BH FFS G1 disk0 : (320.07 GB)
EFI (disk0s1) <not mounted> : 210 MB
[redacted]'s world too (disk0s2) / : 319.21 GB (30.39 GB free)
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
MATSHITADVD-R UJ-868
USB Information: ℹ️
Apple Inc. Built-in iSight
Apple Inc. iPhone
Logitech USB Receiver
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple, Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Configuration files: ℹ️
/etc/hosts - Count: 29 - Corrupt!
Gatekeeper: ℹ️
Mac App Store and identified developers
Kernel Extensions: ℹ️
/Library/Application Support/Roxio
[not loaded] com.roxio.TDIXController (1.7) [Support]
/System/Library/Extensions
[not loaded] com.kensington.mouseworks.iokit.KensingtonMouseDriver (3.0) [Support]
/System/Library/Extensions/KensingtonMouseDriver.kext/Contents/PlugIns
[not loaded] com.kensington.mouseworks.driver.ADBID32Mouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.ADBID32MouseX1 (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.ADBID4Mouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.ADBID4MouseX1 (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.KMWBluetoothHIDMouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.KMWBluetoothOldHIDMouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.KMWUSBHIDMouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.USBMouseX1 (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.VirtualMouse (3.0) [Support]
[not loaded] com.kensington.mouseworks.driver.VirtualMouseX1 (3.0) [Support]
[not loaded] com.kensington.mouseworks.iokit.KensingtonMouseDriverX1 (3.0) [Support]
Startup Items: ℹ️
AdobeVersionCueCS2: Path: /Library/StartupItems/AdobeVersionCueCS2
Firewall: Path: /Library/StartupItems/Firewall
RetroRun: Path: /Library/StartupItems/RetroRun
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
[loaded] com.adobe.CS4ServiceManager.plist [Support]
[loaded] com.adobe.CS5ServiceManager.plist [Support]
[invalid?] com.oracle.java.Java-Updater.plist [Support]
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist [Support]
[invalid?] com.adobe.SwitchBoard.plist [Support]
[loaded] com.adobe.versioncueCS3.plist [Support]
[loaded] com.adobe.versioncueCS4.plist [Support]
[running] com.atomicbird.macaroni.launchd.plist [Support]
[loaded] com.macpaw.CleanMyMac2.Agent.plist [Support]
[invalid?] com.oracle.java.Helper-Tool.plist [Support]
[loaded] com.prosofteng.DriveGenius.locum.plist [Support]
[loaded] com.skype.skypeinstaller.plist [Support]
User Launch Agents: ℹ️
[loaded] com.adobe.AAM.Updater-1.0.plist [Support]
[loaded] com.adobe.ARM.[...].plist [Support]
[loaded] com.adobe.ARM.[...].plist [Support]
[loaded] com.google.keystone.agent.plist [Support]
[loaded] com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist [Support]
[loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist [Support]
[loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist [Support]
[running] com.prosofteng.DGMonitor.plist [Support]
[running] ws.agile.1PasswordAgent.plist [Support]
User Login Items: ℹ️
CNQL1210_ButtonManager ApplicationHidden (/Library/CFMSupport/CNQL1210_ButtonManager.app)
System Events ApplicationHidden (/System/Library/CoreServices/System Events.app)
Mail Application (/Applications/Mail.app)
Firefox Application (/Applications/Firefox.app)
AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader 9/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
Calendar Application (/Applications/Calendar.app)
Skype Application (/Applications/Skype.app)
Dropbox Application (/Applications/Dropbox.app)
AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
MouseWorks Background Application (/Library/Application Support/Kensington/MouseWorks.prefPane/Contents/Resources/Support/MouseWorks Background.app)
Internet Plug-ins: ℹ️
AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Support]
Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
EPPEX Plugin: Version: 3.0.0.0 [Support]
AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Support]
ContentUploaderPlugin: Version: 1.2 [Support]
iPhotoPhotocast: Version: 7.0
RealPlayer Plugin: Version: Unknown [Support]
PDEPrint: Version: 2.0 [Support]
DirectorShockwave: Version: 11.5.2r602 [Support]
PDF Browser Plugin: Version: 2.4.2 - SDK 10.2 [Support]
FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
QuickTime Plugin: Version: 7.7.3
CANONiMAGEGATEWAYDL: Version: 3.0.0.2 [Support]
DivXBrowserPlugin: Version: 1.3 [Support]
Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
Google Earth Web Plug-in: Version: 6.0 [Support]
Default Browser: Version: 537 - SDK 10.9
Flip4Mac WMV Plugin: Version: 3.2.0.16 - SDK 10.8 [Support]
JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
OfficeLiveBrowserPlugin: Version: 12.3.6 [Support]
User internet Plug-ins: ℹ️
QuickTime Plugin: Version: 6.5.1
fbplugin_1_0_0: Version: Unknown [Support]
Safari Extensions: ℹ️
Ultimate [Installed]
3rd Party Preference Panes: ℹ️
ASM [Support]
DivX [Support]
Flash Player [Support]
Flip4Mac WMV [Support]
Macaroni [Support]
Time Machine: ℹ️
Skip System Files: NO
Mobile backups: OFF
Auto backup: NO - Auto backup turned off
Destinations:
G-DRIVE Mini [Local]
Total size: 999.86 GB
Total number of backups: 7
Oldest backup: 2014-07-09 00:13:07 +0000
Last backup: 2014-12-10 22:18:57 +0000
Size of backup disk: Excellent
Backup size 999.86 GB > (Disk size 0 B X 3)
Top Processes by CPU: ℹ️
6% WindowServer
3% firefox
1% mds_stores
0% mdworker
0% Skype
Top Processes by Memory: ℹ️
348 MB firefox
137 MB Skype
122 MB mds_stores
120 MB com.apple.IconServicesAgent
73 MB Dropbox
Virtual Memory Information: ℹ️
1.26 GB Free RAM
1.74 GB Active RAM
477 MB Inactive RAM
543 MB Wired RAM
503 MB Page-ins
0 B Page-outs
Diagnostics Information: ℹ️
Dec 29, 2014, 04:58:09 PM Self test - passed
Dec 29, 2014, 10:58:04 AM /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105804_[redacted].hang
Dec 29, 2014, 10:54:33 AM /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105433_[redacted].hang
Dec 29, 2014, 10:52:33 AM /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105233_[redacted].hang
Dec 29, 2014, 10:50:24 AM /Library/Logs/DiagnosticReports/Keychain Access_2014-12-29-105024_[redacted].hang
Dec 29, 2014, 10:50:24 AM /Library/Logs/DiagnosticReports/Skype_2014-12-29-105024_[redacted].hang -
Trying to do something very strange with layouts and painting components
I'm trying to do something very strange with changing the layout of a container, then painting it to a bufferedImage and changing it back again so nothing has changed. However, I am unable to get the image i want of this container in a new layout. Consider it a preview function of the different layouts. Anyway. I've tried everything i know about swing and have come up empty. There is probably a better way to do what i am trying to do, i just don't know how.
If someone could have a look perhaps and help me out i would be much appreciative.
Here is a self contained small demo of my conundrum.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
// what is should do is when you click on the button "click me" it should place a image on the panel of the buttons in a
// horizontal fashion. Instead it shows the size that the image should be, but there is no image.
public class ChangeLayoutAndPaint
private static JPanel panel;
private static JLabel label;
public static void main(String[] args)
// the panel spread out vertically
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
// the buttons in the panel
JButton b1, b2, b3;
panel.add(b1 = new JButton("One"));
panel.add(b2 = new JButton("Two"));
panel.add(b3 = new JButton("Three"));
b1.setEnabled(false);
b2.setEnabled(false);
b3.setEnabled(false);
// the label with a border around it to show size in a temp panel with flowlayout to not stuff around
// with the actual size we want.
JPanel thingy = new JPanel();
label = new JLabel();
label.setBorder(new LineBorder(Color.black));
thingy.add(label);
// the button to make things go
JButton button = new JButton("click me");
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
//change layout
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.doLayout();
//get image
BufferedImage image = new BufferedImage(panel.getPreferredSize().width, panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
//set icon of jlabel
label.setIcon(new ImageIcon(image));
//change back
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.doLayout();
// the frame
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,200);
frame.setLocation(100,100);
frame.getContentPane().add(panel, BorderLayout.NORTH);
frame.getContentPane().add(thingy, BorderLayout.CENTER);
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setVisible(true);
}Looks like you didn't read the API for Container#doLayout().
Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.
There's also a concurrency issue here in that the panel's components may be painted to the image before revalidation completes. And your GUI, like any Swing GUI, should be constructed and shown on the EDT.
Try this for size -- it could be better, but I've made the minimum possible changes in your code:import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
public class ChangeLayoutAndPaint {
private static JPanel panel;
private static JLabel label;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// the panel spread out vertically
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
// the buttons in the panel
JButton b1, b2, b3;
panel.add(b1 = new JButton("One"));
panel.add(b2 = new JButton("Two"));
panel.add(b3 = new JButton("Three"));
b1.setEnabled(false);
b2.setEnabled(false);
b3.setEnabled(false);
// the label with a border around it to show size in a temp panel with flowlayout to not stuff around
// with the actual size we want.
JPanel thingy = new JPanel();
label = new JLabel();
// label.setBorder(new LineBorder(Color.black));
thingy.add(label);
// the button to make things go
JButton button = new JButton("click me");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//change layout
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
//panel.doLayout();
panel.revalidate();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
//get image
BufferedImage image = new BufferedImage(panel.getPreferredSize().width,
panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
//set icon of jlabel
label.setIcon(new ImageIcon(image));
//change back
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
//panel.doLayout();
panel.revalidate();
// the frame
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 200);
frame.setLocation(100, 100);
frame.getContentPane().add(panel, BorderLayout.NORTH);
frame.getContentPane().add(thingy, BorderLayout.CENTER);
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setVisible(true);
}db
edit I prefer this:import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.*;
public class LayoutAndPaint {
JPanel panel;
JLabel label;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new LayoutAndPaint().makeUI();
public void makeUI() {
JButton one = new JButton("One");
JButton two = new JButton("Two");
JButton three = new JButton("Three");
one.setEnabled(false);
two.setEnabled(false);
three.setEnabled(false);
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.add(one);
panel.add(two);
panel.add(three);
label = new JLabel();
JButton button = new JButton("Click");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layoutAndPaint();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 400);
frame.add(panel, BorderLayout.NORTH);
frame.add(label, BorderLayout.CENTER);
frame.add(button, BorderLayout.SOUTH);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
private void layoutAndPaint() {
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.revalidate();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
BufferedImage image = new BufferedImage(panel.getPreferredSize().width,
panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
label.setIcon(new ImageIcon(image));
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.revalidate();
}db
Edited by: DarrylBurke
Maybe you are looking for
-
I dont understand
-
What am I doing wrong.
-
Empty list in Purchase Order Release
I have the components and notes applied as suggested for the Approve Purchase Order Application.and configurations are done as required in the document.App Implementation: Approve Purchase Contracts - SAP Fiori principal apps for SAP ERP 1.0 - SAP Li
-
Opening Photoshop 7 files in CS2
I work for a very tight company! That being said I am still working with Photoshop 7. I have CS2 at home and have been having trouble getting certain 7 files to open in my CS2. Any suggestions/help?
-
Hi I have got a PXI 8461 and installed latest NI-CAN sotware.Working on real time target, I am trying to run an example CAN VI and I am getting the following error. In MAX, I have self tested the CAN ports and verified the interface name of my ports