JTableHeader Animation

I want to make the JTableHeader of my table animate the way a regular button does when click - flat,lowerd when pressed and high poped-up when released.
I tried making a TableCellRenderer for the header and it works, the Header doesnt animate like a button. Nothing happens when i click it. Still remains flat.
Here is the code:
package tabledemo;
import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
import java.net.URL;
public class ButtonHeaderRenderer extends JButton implements TableCellRenderer {
     static URL picUrl = ClassLoader.getSystemResource("smile.gif");
    public Component getTableCellRendererComponent(JTable table, Object value,
                                                  boolean isSelected, boolean hasFocus,
                                                  int row, int column){
        LookAndFeel.installColorsAndFont(this,"TableHeader.background",
                                         "TableHeader.foreground",
                                         "TableHeader.font");
        LookAndFeel.installBorder(this,"TableHeader.cellBorder");
        setIcon(new ImageIcon(picUrl));
        setText((String)value);
        return this;
}The icon and text show in the table header, but no animation.
I was thinking maybe i can do something if i extend the JTableHeader class. I did that and i can change the dimensions of the columns with it but i dont know how to make the button animate here either.
Here is the extended JTableHeader class:
package tabledemo;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumnModel;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.awt.*;
public class JTableHeaderMouseEvents extends JTableHeader {
    String[] columnNames = {"FirstName","Lastname","Progress"};
    public JTableHeaderMouseEvents(TableColumnModel tcm){
        super(tcm);
        this.setPreferredSize( new Dimension( 70, 18  ) );
        addMouseListener(new MouseAdapter(){
            public void mousePressed(MouseEvent event){
                int i = columnAtPoint(event.getPoint());
                int column = getColumnModel().getColumn(i).getModelIndex();
               // JOptionPane.showMessageDialog(null, "You pressed "+columnNames[column] + " column");
}Maybe in the mousePressed/Released method of MouseAdapter i can use some method to programatically change the button effects?
Any tips are appreciated.

I saw the same problem when I try to put a JComboBox as a column's header. Just set the renderer is not enough, the button won't animate. I can think of two solutions.
1. Do the animation manually.
     JTableHeader th = table.getTableHeader();
     th.addMouseListener( yourMouseListener);
in yourMouseListener, you define have the component
repaint itself, with shadow or without shadow.
2. Make the header editable, just like the editable cells.
Try this:
import javax.swing.*;
import javax.swing.table.*;
* @version 1.0 08/21/99
public class EditableHeaderTableColumn extends TableColumn {
protected TableCellEditor headerEditor;
protected boolean isHeaderEditable;
public EditableHeaderTableColumn() {
setHeaderEditor(createDefaultHeaderEditor());
isHeaderEditable = true;
public void setHeaderEditor(TableCellEditor headerEditor) {
this.headerEditor = headerEditor;
public TableCellEditor getHeaderEditor() {
return headerEditor;
public void setHeaderEditable(boolean isEditable) {
isHeaderEditable = isEditable;
public boolean isHeaderEditable() {
return isHeaderEditable;
public void copyValues(TableColumn base) {
modelIndex = base.getModelIndex();
identifier = base.getIdentifier();
width = base.getWidth();
minWidth = base.getMinWidth();
setPreferredWidth(base.getPreferredWidth());
maxWidth = base.getMaxWidth();
headerRenderer = base.getHeaderRenderer();
headerValue = base.getHeaderValue();
cellRenderer = base.getCellRenderer();
cellEditor = base.getCellEditor();
isResizable = base.getResizable();
protected TableCellEditor createDefaultHeaderEditor() {
return new DefaultCellEditor(new JTextField());
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
* @version 1.0 08/21/99
public class EditableHeader extends JTableHeader
implements CellEditorListener {
public final int HEADER_ROW = -10;
transient protected int editingColumn;
transient protected TableCellEditor cellEditor;
transient protected Component editorComp;
public EditableHeader(TableColumnModel columnModel) {
super(columnModel);
setReorderingAllowed(false);
cellEditor = null;
// The columnModel is changed. It also exists in JTable.
recreateTableColumn(columnModel);
public void updateUI(){
setUI(new EditableHeaderUI());
resizeAndRepaint();
invalidate();
protected void recreateTableColumn(TableColumnModel columnModel) {
int n = columnModel.getColumnCount();
EditableHeaderTableColumn[] newCols = new EditableHeaderTableColumn[n];
TableColumn[] oldCols = new TableColumn[n];
for (int i=0;i<n;i++) {
oldCols[i] = columnModel.getColumn(i);
newCols[i] = new EditableHeaderTableColumn();
newCols.copyValues(oldCols[i]);
for (int i=0;i<n;i++) {
columnModel.removeColumn(oldCols[i]);
for (int i=0;i<n;i++) {
columnModel.addColumn(newCols[i]);
public boolean editCellAt(int index){
return editCellAt(index);
public boolean editCellAt(int index, EventObject e){
if (cellEditor != null && !cellEditor.stopCellEditing()) {
return false;
if (!isCellEditable(index)) {
return false;
TableCellEditor editor = getCellEditor(index);
if (editor != null && editor.isCellEditable(e)) {
editorComp = prepareEditor(editor, index);
editorComp.setBounds(getHeaderRect(index));
add(editorComp);
editorComp.validate();
setCellEditor(editor);
setEditingColumn(index);
editor.addCellEditorListener(this);
return true;
return false;
public boolean isCellEditable(int index) {
if (getReorderingAllowed()) {
return false;
int columnIndex = columnModel.getColumn(index).getModelIndex();
EditableHeaderTableColumn col = (EditableHeaderTableColumn)columnModel.getColumn(columnIndex);
return col.isHeaderEditable();
public TableCellEditor getCellEditor(int index) {
int columnIndex = columnModel.getColumn(index).getModelIndex();
EditableHeaderTableColumn col = (EditableHeaderTableColumn)columnModel.getColumn(columnIndex);
return col.getHeaderEditor();
public void setCellEditor(TableCellEditor newEditor) {
TableCellEditor oldEditor = cellEditor;
cellEditor = newEditor;
// firePropertyChange
if (oldEditor != null && oldEditor instanceof TableCellEditor) {
((TableCellEditor)oldEditor).removeCellEditorListener((CellEditorListener)this);
if (newEditor != null && newEditor instanceof TableCellEditor) {
((TableCellEditor)newEditor).addCellEditorListener((CellEditorListener)this);
public Component prepareEditor(TableCellEditor editor, int index) {
Object value = columnModel.getColumn(index).getHeaderValue();
boolean isSelected = true;
int row = HEADER_ROW;
JTable table = getTable();
Component comp = editor.getTableCellEditorComponent(table,
value, isSelected, row, index);
// if (comp instanceof JComponent) {
// ((JComponent)comp).setNextFocusableComponent(this);
return comp;
public TableCellEditor getCellEditor() {
return cellEditor;
public Component getEditorComponent() {
return editorComp;
public void setEditingColumn(int aColumn) {
editingColumn = aColumn;
public int getEditingColumn() {
return editingColumn;
public void removeEditor() {
TableCellEditor editor = getCellEditor();
if (editor != null) {
editor.removeCellEditorListener(this);
requestFocus();
remove(editorComp);
int index = getEditingColumn();
Rectangle cellRect = getHeaderRect(index);
setCellEditor(null);
setEditingColumn(-1);
editorComp = null;
repaint(cellRect);
public boolean isEditing() {
return (cellEditor == null)? false : true;
// CellEditorListener
public void editingStopped(ChangeEvent e) {
TableCellEditor editor = getCellEditor();
if (editor != null) {
Object value = editor.getCellEditorValue();
int index = getEditingColumn();
columnModel.getColumn(index).setHeaderValue(value);
removeEditor();
public void editingCanceled(ChangeEvent e) {
removeEditor();
// public void setReorderingAllowed(boolean b) {
// reorderingAllowed = false;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.plaf.basic.*;
* @version 1.0 08/21/99
public class EditableHeaderUI extends BasicTableHeaderUI {
protected MouseInputListener createMouseInputListener() {
return new MouseInputHandler((EditableHeader)header);
public class MouseInputHandler extends BasicTableHeaderUI.MouseInputHandler {
private Component dispatchComponent;
protected EditableHeader header;
public MouseInputHandler(EditableHeader header) {
this.header = header;
private void setDispatchComponent(MouseEvent e) {
Component editorComponent = header.getEditorComponent();
Point p = e.getPoint();
Point p2 = SwingUtilities.convertPoint(header, p, editorComponent);
dispatchComponent = SwingUtilities.getDeepestComponentAt(editorComponent,
p2.x, p2.y);
private boolean repostEvent(MouseEvent e) {
if (dispatchComponent == null) {
return false;
MouseEvent e2 = SwingUtilities.convertMouseEvent(header, e, dispatchComponent);
dispatchComponent.dispatchEvent(e2);
return true;
public void mousePressed(MouseEvent e) {
if (!SwingUtilities.isLeftMouseButton(e)) {
return;
super.mousePressed(e);
if (header.getResizingColumn() == null) {
Point p = e.getPoint();
TableColumnModel columnModel = header.getColumnModel();
int index = columnModel.getColumnIndexAtX(p.x);
if (index != -1) {
if (header.editCellAt(index, e)) {
setDispatchComponent(e);
repostEvent(e);
public void mouseReleased(MouseEvent e) {
super.mouseReleased(e);
if (!SwingUtilities.isLeftMouseButton(e)) {
return;
repostEvent(e);
dispatchComponent = null;
Here is my source code for using it:
EditableHeaderTableColumn column0 = (EditableHeaderTableColumn)columnModel.getColumn(0);
ComboRenderer renderer = new ComboRenderer(items);
column0.setHeaderRenderer(renderer);
// setHeaderEditor is provided by EditableHeaderTableColumn
column0.setHeaderEditor(new DefaultCellEditor(combo));
I can create DefaultCellEditor using a combobox. But you need to create the ButtonEditor, because DefaultCellEditor constructor won't take JButton.
Good luck!

Similar Messages

  • Open and edit animated .gif while preserving frame timing

    CS4 Premium Design Edition, Win XP
    I was disappointed with the removal of Image Ready from CS3 because although some of the functionality was placed into Photoshop 10, there was no way to open and edit an existing animated .gif while preserving the timing of each individual frame. I was told on the PS forum at the time that I really needed to use Fireworks. I resented that, because I was very happy with Image Ready and I didn't want to have to learn a new application just to gain functionality that had been included in previous versions of PS/IM.
    I've now got CS4 Premium Design Edition which of course includs Fireworks... and here's what Help has to say on the subject of imported .gifs.
    "Note: When you import an animated GIF, the state delay setting defaults to 0.07 seconds. If necessary, use the States panel to restore the original timing."
    This is no use to me. What if I don't know the individual frame timings? What if there are 200 frames with varying timings?
    Simple question: which current Adobe product is capable of importing a .gif while retaining the frame timings? If anyone knows, or if I've misunderstood the nature of the Fireworks Help quote above, I'd really appreciate some input here. Thanks :)
    Not so simple question: why was an excellent gif-editing application thrown out to have its functionality partially replaced by a bunch of scripts and half-effective workarounds cooked up by desperate users ("import a gif by using the video import and typing *.* into the filename box..")? It's a fair question I think.
    Mark

    Hi Bob, that's not glib at all, it's a reasonable question.
    I uninstalled it along with everything else when I installed CS3, in the reasonable expectation that whatever replaced IR would be at least equal in functionality.
    Perhaps I should just dig out CS2 and install IM from there, but I have some serious reservations about doing so, because I don't know if/how a partial install of CS2 will impact upon my installation of CS4, and I'm not confident of getting support.
    I am also curious to know if/why Adobe actually removed basic functionality without replicating or replacing it in their other software. I really want to know: which recent, currently supported Adobe product
    should I be using in order to regain this functionality? Or do Adobe no longer produce a geniuinely comprehensive .gif-editing application?
    Mark

  • Animated GIF ignoring frame timing

    I am trying to create simple animated GIFs with a few layers
    of text that simply fade in and fade out in sequence. My initial
    attempt worked perfectly. Most frames use the default 7/100's of a
    second delay as they fade. A few frames were manually set to much
    longer delays so that the text pauses, before fading out to be
    replaced by the next text.
    When I reopened the file, to adjust the background color, and
    then re-saved it, the GIF now plays straight through, ignoring the
    timing of each frame. Nothing I do now can get it to pause on the
    appropriate frames. I've tried cutting the symbols out and pasting
    them into a new file, removing the animation from the symbols and
    reapplying it, etc.
    Any ideas, anyone?
    Thanks in advance.

    None, None.

  • Edit animated gif

    Hi,
    How can I edit an animated gif in Photoshop Elements 6 for Mac?
    When I open the file there is just the first frame in one layer - no other layers available.
    Thanks!

    Thanks Barbara!
    Barbara B. wrote:
    ... then bring it to PSE.
    I can't drag the single frames from Preview to PSE, because PSE 6 doesn't run in window mode.
    (Is this improved in the current version?)
    I can only drag the single frames to the desktop (as TIFF files, I guess transparency info is lost then?).
    Barbara B. wrote:
    ... there's a bug beginning in PSE 6 where you can't change the frame delay rate from the default when you save an animated gif.
    What's the default frame delay rate? Maybe it's just what I need.
    Barbara B. wrote:
    You might  want to look into a free program like giffun from stone.com instead.
    Yes that's maybe a better idea. It doesn't have to be free software. Can you recommend something good?
    Thanks again!

  • Can i open and edit animated GIF in Adobe Photoshop Touch?

    Can i open and edit animated GIF in Adobe Photoshop Touch?

    No, only regular static GIF images are supported. The desktop version of Photoshop does support this however.

  • Gif animations in Mail

    I've read some threads about this problem, and while there is lively debate, there doesn't seem to be an answer. So I thought I would try it again with a new question.
    A friend of mine (he has an old IMac) forwarded me an email with an animated gif. It was funny, and I wanted to forward it on. But I have never been able to do this. If I try to save the file, it saves as a MIME attachment, and I can't even open it. If I Download the file, the Get Info says it is a gif file, but if I open it in Preview, or attach it to a new email, it no longer animates and is just a still picture.
    I tried forwarding the original email with the animated gif back to myself, and when it arrives, it no longer animates. My friend is no help. He's not really in to computing. He told me he just gets them from somebody else, and forwards it to me.
    So why can I see the animated gif in my Mail, but can't save it, download it, cut & paste it, or forward it? I tried the Append Message suggestion from an old post, and that did not work either.
    I noticed in some of the old posts some people seem to really hate gif's. I don't really care one way or the other. I just want to understand why my computer can receive them, but can't do anything else with them.

    Although Jaguar and Panther Mail renders HTML received, they do not support composing HTML which also includes when forwarding a message received that was composed in HTML including animated gifs.
    Although you cannot compose complex HTML within the body of a message with Tiger Mail, RTF with Tiger Mail is HTML and supports forwarding a message received that was composed in HTML including animated gifs.
    Reason for this: if you automatically render all HTML received (with any email client with OS X) and a spammer uses HTML for message composition and includes embedded images or objects that must be rendered from a remote server, if the Mail.app Junk Mail filter does not automatically mark the message as junk and you open the message, this can reveal that your email address is valid to the spammer causing more spam to be received.
    Copied from Why HTML in E-Mail is a Bad Idea:
    "Because it introduces accessibility problems. When you write in plain text, the receiving mail client renders the text in whatever font the reader chooses. When you format email with HTML, the sender controls the formatting. But this is a trap: You only think your message will render the same way to the viewer as it appears to the sender. In reality, the receiver can end up squinting because the font looks so tiny, or vice versa. HTML is not rendered the same way from one viewing client to the next - all guarantee of accessiblity goes out the window. This is especially problematic for visually impaired persons."
    Because it can introduce security issues and trojan horses -- it's a gateway to danger as any Outlook user can tell you. HTML can include any number of scripts, dangerous links, controls, etc.
    Powerbook G4 17"   Mac OS X (10.4.5)  

  • Animated GIFs are ridiculously large - why?

    Hi all,
    I cannot figure out why the animated GIFs I am exporting are
    so massive in file size. For example, I import a small 5-frame
    650Byte GIF. I edit the size of the canvas to pad it to a square
    (from 54x40 to 54x54, or something like that), then I save it with
    the following settings:
    Animated GIF
    Exact Palette
    0 Loss
    4 Colours (5 including alpha channel)
    No dither
    And it comes out as 64.4KB. How can the file size increase by
    100 times with barely any change? Even if I import it, change
    nothing and save the file with the same settings as above, it's
    still 64.4KB. Is Fireworks padding the file with unnecessary
    information or something?
    Thanks for any help,
    John.

    > But the original image is an animated GIF and it's less
    than 1KB big! So
    > how
    > does it increase in size 100 times when I save it
    even if I don't
    > change
    > anything about the image before saving? There is no
    PNG file but I can
    > link
    > you to the original 650 Byte Animated GIF:
    I'm confused. What is this I am looking at. What have you
    done to it to
    make it increase in weight?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Quircus" <[email protected]> wrote in
    message
    news:g6fohk$mip$[email protected]..
    > But the original image is an animated GIF and it's less
    than 1KB big! So
    > how
    > does it increase in size 100 times when I save it
    even if I don't
    > change
    > anything about the image before saving? There is no
    PNG file but I can
    > link
    > you to the original 650 Byte Animated GIF:
    >
    >
    http://www.aotplaza.com/Prod.gif
    >
    > Is it something to do with my settings perhaps? Like
    telling it to save
    > extra
    > information in the file?
    >

  • Gif not animating when on the Internet

    Hopefully some one can help as I have tried everything i can
    think of
    I have create a animation using Flash 8 I have exported this
    as a Animated gif to my computer. I can open the file and it
    animates fine on my pc. When i upload to myspace it does not
    animate.
    I have tried downloading a random gif from the net and
    uploading it to myspace and this animates (Just wanted to check
    Myspace works with gifs)
    The problem only appears to be with animations I have made.
    I have tried making a really small animation (about 110kb)
    then uploading it to myspace but again it doesnt animate (so its
    not a size issue)
    Flash - I have tried exporting movie as a gif and publishing
    as a gif. The Animation has been made using motion tweed and not an
    action script and I have tried every combination of gif option i
    can think of i.e loop animation, loop twice, changing the frame
    rate, size , colours, transarency etc
    Please help as im so confused as to why this doesnt work.

    Perhaps Safari isn't quite what you require, too much work involved all the time making it easier to see
    Take a look at my customized Firefox:
    it always opens to the same size window (or full screen if you like)
    it always zooms all web pages 160% (or whateve you like)
    it always has large type on the menu bar area. (to whatever you like)
    it's very highly customizable,  (or use the plain default settings)
    has more add-ons than anyone (a real plus when you need it)
    has more themes and personas than anyone (make it YOUR browser)
    Easier surfing option for hard of seeing users
    Safari is about the absolute worst browser since Internet Explorer, it's because Apple has already got your money so there isn't any incentive for them to make a better browser.

  • Gif Animations

    First off, I'd like to say I've been making gif animations in Photoshop Elements since 2.0, and I've had no problem with 6.0 either--- when I was on Windows.
    For whatever reason, when I open a .gif animated image, I get an error message that says:
    "This is an animated GIF. You can only view one frame. Saving over this file will result in a loss of information."
    EVERY single time I open a gif, and as soon as I hit okay, it opens to the single frame locked. As I said, I've never had this problem with Photoshop Elements 6.0 in Windows... Any suggestions/ help please?

    Your post is unclear on some important points. When you say "when I was in Windows" does that mean you are talking about a mac now? What version of PSE are you talking about?
    If you mean PSE 8 for mac, you would be better off downloading a program like the free Giffun from stone.com and using that for animated gifs. For one thing the frame rate has been broken in the mac version of PSE in both 6 and 8.

  • Animated gifs in PS CS6

    Hi all, I am trying to save animated gifs from PS, I can get it to work fine when the layers are just flat layers, but I need to create the animated gif when I have layer folders... Ie layer 1 will have a graphic and some text, layer 2 different graphic and different text. But I have to create lots of banners each with a slight change on the text. So I want to keep the text editable so its quick to just chnage the text and then save another animated gif. But when I try and create frames from layers its bringing all the bits from the layer as different frames ie the graphic is one frame then the text is one frame etc. Is it possible to create the animated gif while still having layer folders or does it just work if they are flat layers?

    Hi thanks for the reply, i didnt think it was really working, but now I have had a play, it does work and its pretty easy to change the text, it does pop open another photoshop file to edit the text, but it works ok.
    Thanks

  • Importing .GIF into Fc will not play the animated gif in output

    I imported a animated .gif  (attached video.gif) into Fc (of a sequence of pics I took saved as an animated .gif)
    It inported as a "bitmap image" and upon export to swf it did NOT show the .gif as an animated .gif but just shows the first frame..
    (It did not put this file into an assests folder...)
    So I converted the "bitmap image" into an optimaized graphic...and NOW it DOES put the original animated gif into the "assets" folder with a Graphic1.fxg and video.gif in that folder.. and If I open the gif in the assest folder it plays it as the animated .gif it is..
    BUT SADLY upon export to SWF it still DOES not play the gif as an animated gif.. just the first frame...
    Can I do anything in the code to tell the swf file that is exported to play the gif in the assest folder as an animated gif not just show the frame?
    I did the animated gif approach becasue I setup a photoshop cs4 file with a quicktime video as a layer and Fc only brought in the first frame of the quicktime layer..
    Could the next beta of Fc include the ability to import and play animated gifs as artwork as well AND/or to import Ps Cs4 video layers as videos
    So I would have to created a video page in flash pro and import that as a object? into a state?
    (no experience with flash pro but just bought cs4 and will try to learn FlashPro overweekend)

    Interesting. I don't think this is somethign you can do in Flash Catalyst. We have .GIF support in the Flash Player but I don't think you can use a GIF asset inside Catalyst. If you need that GIF to play you'll have to embed it using Flash Builder.
    But Flash Catalyst will support video version 1.0. I don't think you can turn arbitrary layers into "video" layers but you can bring in video files (like .FLV) and then attach components to behaviors (like play, stop, etc).
    =Ryan
    [email protected]

  • Load/import images into layers to create animated gif in PE4

    I'm trying to make an animated gif using Photoshop Elements 4.0.
    I have numerous images (photos) that I need to insert into separate frames of one image.
    (photo1, photo2 ..... photo10 - all combined in layers to create the frames of the animated gif)
    I can open each photo separately, copy it, go the the animated gif image, create a new layer, and paste the image into the layer to create a frame in the animated gif.  This is very time consuming.
    Does Elements 4.0 allow for just opening/importing the separate images (photos) into the layers (frames) of the gif direclty?  I remember having software that came with Macromedia Dreamweaver 4.0 in 2000 that made this simple and straight forward.

    We are not the right people to ask.  The Touch forum (for tablet) is at
    Adobe Photoshop Touch for tablet
    There's a long list f video tutorials here, but I can't see anything about animation
    Learn Photoshop Touch | Adobe TV

  • How can I make a transparent animated gif?

    I'm using CS2. I have an animated gif that I want to take the black background out of so that the animated part of it is all that remains.
    Here is a link to the image:
    http://img.photobucket.com/albums/v97/tragicmike/random/Tesseract.gif
    I basically want to remove all of the black background from the image so that the animated tesseract is all that remains. I know how to open the gif to expose the layers using ImaegeReady, then edit them in PhotoShop. But when I made the black areas of each layer transparent (by selecting the RGB channel, inverting the selection, and hitting delete), saved a copy, and tried viewing it, it seems to just display all of the transparent layers constantly instead of cycling through them.
    Can someone please help me figure out how to make an animated gif with a transparent background? If I lose some of the black areas of the animated part (since they seem to get deleted when I remove all of the black background) it's no big deal. I just need to know how to do this so that it plays correctly.
    Thank you!!!
    Mike

    &gt;
    <b>"I have to wonder why the black background was included on every frame of the moving shape."</b>
    <br />
    <br />Well, George...the only reason I can think of is because it's an animated GIF, and GIFs only support one layer.
    <br />
    <br />Whatever application it was created in should have been able to render it out with a transparent BG. But I suppose the creator had his/her reasons for going with the black BG.
    <br />
    <br />(Full disclosure: I ran across
    <s>that same</s> a similar animation back in December, and the version I grabbed only had the black showing through the inside of the tesseract. I opened it in ImageReady and
    <b>
    <i>added</i>
    </b> a black BG so the edges didn't look jaggedy.)
    <br />
    <br />
    <a href="http://www.pixentral.com/show.php?picture=1FgHXbj4UpXYtUVrbeah7sbqQXDR40" /></a>
    <img alt="Picture hosted by Pixentral" src="http://www.pixentral.com/hosted/1FgHXbj4UpXYtUVrbeah7sbqQXDR40_thumb.gif" border="0" />

  • Help with exporting as an animated gif

    I've created a small banner ad and need to export it as an animated gif.  The problem is, when I open the gif after exporting it, there's no animation.  The way the animation is set up is 1 frame on the main timeline, and a scrolling movie clip as the background.  There is no actionscript at all in the file.

    instead of converting your movieclip to a graphic:
    1.  copy the movieclip frames
    2.  create a new graphic
    3.  paste the frames to the graphic timeline
    4.  drag the graphic to the main timeline and remove the movieclip
    5.  extend the main timeline enough frames to reveal the graphic animation
    6.  make sure your gif publish settings are for an animated gif

  • How Do I Load An Animated GIF Into PictureBox Control From Byte Array?

    I'm having a problem with loading an animated GIF int a picturebox control in a C# program after it has been converted to a base64 string, then converted to a byte array, then written to binary, then converted to a base64 string again, then converted to
    a byte array, then loaded into a memory stream and finally into a picturebox control.
    Here's the step-by-step code I've written:
    1. First I open an animated GIF from a file and load it directly into a picturebox control. It animates just fine.
    2. Next I convert the image in the picturebox control (pbTitlePageImage) to a base64 string as shown in the code below:
                    if (pbTitlePageImage.Image != null)
                        string Image2BConverted;
                        using (Bitmap bm = new Bitmap(pbTitlePageImage.Image))
                            using (MemoryStream ms = new MemoryStream())
                                bm.Save(ms, ImageFormat.Jpeg);
                                Image2BConverted = Convert.ToBase64String(ms.ToArray());
                                GameInfo.TitlePageImage = Image2BConverted;
                                ms.Close();
                                GameInfo.TitlePageImagePresent = true;
                                ProjectNeedsSaving = true;
    3. Then I write the base64 string to a binary file using FileStream and BinaryWriter.
    4. Next I get the image from the binary file using FileStream and BinaryReader and assign it to a string variable. It is now a base64 string again.
    5. Next I load the base64 string into a byte array, then I load it into StreamReader and finally into the picturebox control (pbGameImages) as shown in the code below:
    byte[] TitlePageImageBuffer = Convert.FromBase64String(GameInfo.TitlePageImage);
                            MemoryStream memTitlePageImageStream = new MemoryStream(TitlePageImageBuffer, 0, TitlePageImageBuffer.Length);
                            memTitlePageImageStream.Write(TitlePageImageBuffer, 0, TitlePageImageBuffer.Length);
                            memTitlePageImageStream.Position = 0;
                            pbGameImages.Image = Image.FromStream(memTitlePageImageStream, true);
                            memTitlePageImageStream.Close();
                            memTitlePageImageStream = null;
                            TitlePageImageBuffer = null;
    This step-by-step will work with all image file types except animated GIFs (standard GIFs work fine). It looks like it's just taking one frame from the animation and loading it into the picturebox. I need to be able to load the entire animation. Does any of
    the code above cause the animation to be lost? Any ideas?

    There is an ImageAnimator so you may not need to use byte array instead.
    ImageAnimator.Animate Method
    http://msdn.microsoft.com/en-us/library/system.drawing.imageanimator.animate(v=vs.110).aspx
    chanmm
    chanmm

Maybe you are looking for

  • Multiple devices and accounts?

    Hello I've been using iTunes on Windows for many years and then on a Mac Mini for the last 2 years. Life was simple, I had my own iPods and then also an iPhone, no other users to think about. However, life is now more complicated. My wife now has an

  • How do you export multiple photos to the Camera Roll?

    The option to save multiple images to the Camera Roll does not work on my iPad 2. I tap Share, then tap Camera Roll and a list of options shows up. However, the options All and Selected are greyed out. Whatever I tried to do, they stay grey. This is

  • Reading attachments via Javamail gives ? characters

    Hi, I'm using Javamail to read messages in a mailbox and to save the attachments that are on those messages. Some attachments are HTML documents that seem to contain bullet characters (doing a View Source on the HTML still shows the bullet, not "<li>

  • Why does embeded .swf file goes crazy in IE but not in other browsers?

    hi everyone I'm building a SharePoint page with an embedded .swf file that is capable of detecting the current URL to activate and show content. Everything goes smoothly in all the browsers I've tested it except IE. When I open the SharePoint page in

  • Retreiving HTML data from an URL

    It is possible to get HTML data (HTML source) from Java (text), and store them in a string ? Using java application (no gui).