comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* JWindow on the desktop - 3 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9a2ba0e6bc4f0a65
* Proffesional PDF library for Java - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4e08867027c3b578
* Color.white vs. Color.WHITE - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3941799a8e0e5feb
* Java Generics FAQ - 3 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/74e7af3fdd4a3617
* Scientific Dogma - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8beff1743cc2327
* Was ist ein opcode - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6af3ed468d4124f0
* XMLencoder custom - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9f2147a7922efd69
* Resize JSplitPane Contanier - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c419d333b537fe9
* A good IDE?? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fbb4408bff9b23fd
* Help Please - JBuilder 9 + JDK 1.5 - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87f2065d90119021
* Creating a Custom Circular Layout Manager! - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75e8a80e6f265e4d
* emacs Vs Eclipse? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1
* JMF and JMFREGISTRY - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ade340ef0d32c570
* Java Mail API - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb8d31b83e9393cf
* Solved: XMLencoder custom - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/82bd7a799bc1f172
* Documentation for generics - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd3160390776af24
* Checksum java - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2
* JTabbedPane size of Tabs - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8fa0800c935be979
* Awesome flash site... can swing do this? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3c6b95b8cc16c92
* java data structure and algorithm libraries - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dee22584eabc2be8
* refreshing the tree without collapsing the nodes - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/21aef518dd14affb
* Teaching resources - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/90b8d2e219def2a8
  
==========================================================================
TOPIC: JWindow on the desktop
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9a2ba0e6bc4f0a65
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 6 2004 8:15 am
From: "Lee" <[EMAIL PROTECTED]> 

Does anyone know how I can get a JWindow to sit on the desktop and always be
at the bottom of all the windows? I've tried jwindow.toBack() but it seems
to disappear altogether.





== 2 of 3 ==
Date:   Wed,   Oct 6 2004 8:23 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Wed, 06 Oct 2004 15:15:04 GMT, Lee wrote:

> I've tried jwindow.toBack() but it seems
> to disappear altogether.

It works in my code.  Where's yours?
<http://www.physci.org/codes/sscce.jsp>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 3 ==
Date:   Wed,   Oct 6 2004 8:39 am
From: "Lee" <[EMAIL PROTECTED]> 

toBack() doesn't work on this:

 public DesktopPanel()
 {

  Dimension screenSize =
        Toolkit.getDefaultToolkit().getScreenSize();

  JPanel j = new JPanel();
  j.setBorder(new LineBorder(Color.blue));

  setSize((int)(screenSize.getWidth()), 22);
  setLocation(0,(int)(screenSize.getHeight())-100);

  setContentPane(frameContent);
  frameContent.setBackground(new java.awt.Color(58,58,58));
  frameContent.setLayout(new BorderLayout());

  addMouseMotionListener(this);
  addMouseListener(this);

  JButton quitButton = new JButton("X");
  quitButton.setSize(20,20);
  quitButton.addActionListener(new ActionListener() {
   public void actionPerformed(ActionEvent e) {
    System.exit(99);
   }
  });


  JLabel west=null;
  try{
   west = new JLabel(new ImageIcon("logo.gif"));
  }catch(Exception gh){gh.printStackTrace();}

  frameContent.setBorder(new LineBorder(new java.awt.Color(189,189,255)));
  frameContent.add(west, BorderLayout.WEST);
  frameContent.add(quitButton,BorderLayout.EAST);

  setVisible(true);
  toBack();

 }









"Andrew Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 06 Oct 2004 15:15:04 GMT, Lee wrote:
>
> > I've tried jwindow.toBack() but it seems
> > to disappear altogether.
>
> It works in my code.  Where's yours?
> <http://www.physci.org/codes/sscce.jsp>
>
> --
> Andrew Thompson
> http://www.PhySci.org/codes/  Web & IT Help
> http://www.PhySci.org/  Open-source software suite
> http://www.1point1C.org/  Science & Technology
> http://www.lensescapes.com/  Images that escape the mundane






==========================================================================
TOPIC: Proffesional PDF library for Java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4e08867027c3b578
==========================================================================

== 1 of 2 ==
Date:   Wed,   Oct 6 2004 8:17 am
From: [EMAIL PROTECTED] (Enrique Ariz?n Benito) 

I'm used to the ReportLab library (www.reportlab.org) for Python, but
just by "accident" I have got involved in a I Java project and my team
need something equivalent in Java to generate PDF's. I just found
iText available but is far away from our needs

 Would it be possible to use Jython with ReportLab?

 Thanks in advance for any help!



== 2 of 2 ==
Date:   Wed,   Oct 6 2004 9:49 am
From: Chiron Paixos <[EMAIL PROTECTED]> 

Maybe you look at
http://www.geocities.com/marcoschmidt.geo/java-libraries-pdf.html to
find something useful.




==========================================================================
TOPIC: Color.white vs. Color.WHITE
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3941799a8e0e5feb
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 8:21 am
From: Chris Smith <[EMAIL PROTECTED]> 

Jacob wrote:
> As a client application developer I must now choose between
> the non-standard (and possibly soon-to-be-deprecated)
> Color.white and the not-backwards-compatible Color.WHITE.
> 
> I've ended up with new Color (255, 255, 255) instead.

There's no need for that.  If you're deploying on Java 1.1 (and I'd be 
forced to wonder why, but that's another matter...) then use 
Color.white.  When you're deploying on more recent Java runtime 
versions, use Color.WHITE instead.  Eventually, people will stop 
deploying code on 1.1, and Color.white will go away.

I can say with some certainty that Sun won't remove the old name until 
it is well past no longer necessary.  (As a reference point, note that 
Java 5.0 still provides the same deprecated event model that was made 
obsolete by Java 1.1)

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: Java Generics FAQ
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/74e7af3fdd4a3617
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 6 2004 8:41 am
From: David <[EMAIL PROTECTED]> 

NICE..  I blogged it for my meager reader base.. ;)

http://mywebpages.comcast.net/daorriss/



== 2 of 3 ==
Date:   Wed,   Oct 6 2004 8:34 am
From: [EMAIL PROTECTED] 

This message was cancelled from within Mozilla.




== 3 of 3 ==
Date:   Wed,   Oct 6 2004 8:35 am
From: Kris Nuttycombe <[EMAIL PROTECTED]> 

Aha, Now I understand what I was doing wrong. My confusion was between 
the runtime and compile time types. Thanks!

Kris

Jesper Nordenberg wrote:
> "Sebastian Millies" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> 
>>short addition: re-reading the OP's requuirement, I guess that
>>should really be:
>>
>>Map<Class<T>,DataConverter<T,?>>
> 
> 
> This is not what I meant, but sure, this can be done, but it doesn't
> make any sense. There is only one key you can use for such a map
> (since there is only one instance of Class<T> for any T), so why are
> you even using a Map in the first place?
> 
> I think the OP wants a map where you given a class can lookup a
> DataConverter for a objects of that class. Something like this:
> 
> interface ObjectConverterMap<O> {
>   <T> void put(Class<T> key, DataConverter<? super T, O> value);
>   <T> DataConverter<? super T, O> get(Class<T> key);
> }
> 
> Or maybe he wants a DataConverter for the class object:
> 
> interface ClassConverterMap<O> {
>   <T> void put(Class<T> key, DataConverter<Class<T>, O> value);
>   <T> DataConverter<Class<T>, O> get(Class<T> key);
> }
> 
> Neither of these interfaces are compatible with the java.util.Map
> interface.
> 
> /Jesper Nordenberg





==========================================================================
TOPIC: Scientific Dogma
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8beff1743cc2327
==========================================================================

== 1 of 2 ==
Date:   Wed,   Oct 6 2004 8:49 am
From: "Tom" <[EMAIL PROTECTED]> 


"nog" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 4 Oct 2004 17:58:37 GMT, Alexander Mulligan wrote:
>
> > I am in my early 50's, ...
>
> Old _and_ wise, gosh!

Don't assume that's actual, physical years.

"Alexander Mulligan" is a character invented by Bruce Burhans, who is a guy
living on disability in Bellingham, Washington.  In his copious free time,
he imagines that there is a secret super-ecological commune whose members
regularly sneak into Bellingham to use Bruce's internet connection.
"Alexander Mulligan" is one of these imaginary commune residents.  He could
be any age at all, at Bruce's whim.

Such is the power of Bruce's "magical science".  There is virtually nothing
in the vast world of his imagination that he doesn't have to power to
rearrange to suit him.  The limits on his ability become apparent when he
says, as he does on occasion, that he "cannot imagine" this or that.

One glance at the kind of newsgroups in the crosspost list of this post will
tell the savvy Usenet denizen what Bruce is actually up to.





== 2 of 2 ==
Date:   Wed,   Oct 6 2004 8:58 am
From: Alexander Mulligan <[EMAIL PROTECTED]> 

"nog" 

5 lines with no quoted material in response to
a 150+ line post on a serious subject?

Post ignored, as will any subsequent posts by you,
and any responses to them.

My newsreader is a troll-free zone.

[...]


<+> 

-- 
Bells Ring Under Cerulean Ecstasy 

http://groups.google.com/[EMAIL PROTECTED]





==========================================================================
TOPIC: Was ist ein opcode
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6af3ed468d4124f0
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 6 2004 8:43 am
From: "Stefan Schwing" <[EMAIL PROTECTED]> 

Hallo,

beim ausführen einer JSP / Servlet bekomme ich ab und an das:

java.lang.InternalError: undefined opcode
    at java.util.ResourceBundle.getBundle()
    at java.util.ResourceBundle.getBundle()
    at java.util.Locale.getDisplayCountry()
    at java.util.Locale.getDisplayCountry()
    ...

Was könnte ich dagegen tun bzw. was genau läuft hier schief ?

Danke & Gruss,
Stefan





== 2 of 3 ==
Date:   Wed,   Oct 6 2004 9:16 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Stefan Schwing wrote:
> beim ausführen einer JSP / Servlet bekomme ich ab und an das:
> 
> java.lang.InternalError: undefined opcode
>     at java.util.ResourceBundle.getBundle()
>     at java.util.ResourceBundle.getBundle()
>     at java.util.Locale.getDisplayCountry()
>     at java.util.Locale.getDisplayCountry()
>     ...
> 
> Was könnte ich dagegen tun bzw. was genau läuft hier schief ?

Ein Opcode ist eine Instruktion der Java Virtual machine, also im compilierten
Class-File. Sieht für mich so aus, also ob entweder Deine Java-installation
kaputt ist oder die Hardware (Speicherfehler könnten auch zu sowas führen).



== 3 of 3 ==
Date:   Wed,   Oct 6 2004 11:04 am
From: "andreas" <[EMAIL PROTECTED]> 


Stefan Schwing wrote:
> beim ausführen einer JSP / Servlet bekomme ich ab und an das:
>
> java.lang.InternalError: undefined opcode
>     at java.util.ResourceBundle.getBundle()
>     at java.util.ResourceBundle.getBundle()
>     at java.util.Locale.getDisplayCountry()
>     at java.util.Locale.getDisplayCountry()
>     ...
>

maybe you want to stick to de.java or something for german posts?

andreas 






==========================================================================
TOPIC: XMLencoder custom
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9f2147a7922efd69
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:02 am
From: [EMAIL PROTECTED] (Yamin) 

Hey all,

I'm using XML encoder for long term storage.  However, I'd like to be
able to customize what is saved at runtime.  Why?  There are several
data structures, which can balloon the size of the file to a few
megabytes.  This data is not something every user might want to save
on load.  I'd like to give them the option of whether or not to encode
these particular data structures.  The rest of the code is perfectly
capable to dealing with these structures set to null.  They often are
null.

I was thinking the easiest way for me to do this would be as follows:
I know this is not XMLEncoder code (but java serialization type
code...but that's what I need help with :) )  I have a feeling this is
going into  the realm of persistance delegates, but I really have no
idea.

  private Hashtable details= null;
  private void writeObject(ObjectOutputStream s) throws IOException 
  {
    if( dontSaveDetails)
    {
         Hashtable detailsBackup =  details;
         //clear the details, so they're not saved
         setDetails(new Hashtable());
         s.defaultWriteObject();
         //restore details for the current session
         details = bckdetails;        
    }
    else
    {
      s.defaultWriteObject();        
    }
  }

Any ideas on how to put this logic into the XMLencoder world?

Thanks,

Ymain




==========================================================================
TOPIC: Resize JSplitPane Contanier
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c419d333b537fe9
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:10 am
From: [EMAIL PROTECTED] (Naveen Bandhu) 

Hi all, 

I want to resize the container which holds JSplitPane. The situation
is with right button pressed the container should be resized to the
size of left component of JSplitpane and with left button pressed
container should be expanded to the size of left component +
Jsplitpane + right component, unlike the default behaviour of
JSplitpane.  How can i acheive this?

Thanks in advance.

Naveen.




==========================================================================
TOPIC: A good IDE??
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fbb4408bff9b23fd
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:31 am
From: Lasse Reichstein Nielsen <[EMAIL PROTECTED]> 

"Virgil Green" <[EMAIL PROTECTED]> writes:

[www.worcsnet.com]

> Can't get past the first page at that site with IE 5.0.

It says 

 "Inet Application Builder requires Internet Explorer 5.5+ or 
  Netscape v6.2+."

Since I'm using Opera, there's no way I can see it either.
For something supposed to create pages for the internet, not supporting
standards compliant browsers should be disqualifying :)

/L
-- 
Lasse Reichstein Nielsen  -  [EMAIL PROTECTED]
 DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
  'Faith without judgement merely degrades the spirit divine.'




==========================================================================
TOPIC: Help Please - JBuilder 9 + JDK 1.5
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87f2065d90119021
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:41 am
From: "Newbie" <[EMAIL PROTECTED]> 

I have been using Jbuilder 9 for only a short period of time and still
trying to learn Java overall.

I downloaded the new JDK 1.5 and when I set the project properties to use
that JDK version it gives me the folllowing error :

"myGui.java": cannot access javax.swing.JFrame,bad class file:
C:\jdk1.5.0\jre\lib\rt.jar\javax\swing\JFrame.class,class file has wrong
version 49.0, should be 48.0,Please remove or make sure it appears in the
correct subdirectory of the classpath. at line 7, column 26

My system path is as follows:

%SystemRoot%\system32;%SystemRoot%;C:\jdk1.5.0\bin

The "myGui.java" works fine with the "java version 1.4.1_02-b06" that was
installed along with JBuilder9 without throwing any errors.

Can someone tell me what i require to do in order that i can use the new JDK
with JBuilder9 please. I am interested in the nano timer of the new JDK.

Thanks!







==========================================================================
TOPIC: Creating a Custom Circular Layout Manager!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75e8a80e6f265e4d
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:42 am
From: Scott Robert Ladd <[EMAIL PROTECTED]> 

On Wed, 06 Oct 2004 06:26:17 +0000, ***C.Steamer*** wrote:

> Hello, Has anyone else ever created a Custom Layout Manager that puts all 
> the items in a circle. Basically I am using this to put Playing Cards in a 
> circle around a table. Any help would be great. Thanks

This is old, Java 1.1 code, but it should be adaptable to a newer JVM:


import java.awt.*;

//
//
// ClockLayout
//
//
public class ClockLayout
    implements LayoutManager2
{
    //-------------------------
    // finalants
    //-------------------------
    private static final String [] POS_NAME =
    {
         "0","1","2","3","4","5","6","7","8","9","10","11","12"
    };

    public static final String CENTER  =  "0";
    public static final String CLOCK01 =  "1";
    public static final String CLOCK02 =  "2";
    public static final String CLOCK03 =  "3";
    public static final String CLOCK04 =  "4";
    public static final String CLOCK05 =  "5";
    public static final String CLOCK06 =  "6";
    public static final String CLOCK07 =  "7";
    public static final String CLOCK08 =  "8";
    public static final String CLOCK09 =  "9";
    public static final String CLOCK10 = "10";
    public static final String CLOCK11 = "11";
    public static final String CLOCK12 = "12";
    public static final String CLOCK00 = CLOCK12;

    //-------------------------
    // fields
    //-------------------------
    private Component [] m_comp;

    //-------------------------
    // exceptions
    //-------------------------
    private static final IllegalArgumentException err1 = new 
IllegalArgumentException("invalid ClockLayout radius");

    //-------------------------
    // finalructors
    //-------------------------
    public ClockLayout()
    {
        // allocate component array
        // automatically initialized to null references
        m_comp = new Component [13];
    }

    //-------------------------
    // methods
    //-------------------------
    public void addLayoutComponent
        (
        Component comp,
        Object    obj
        )
    {
        // convert the object to a string
        if (obj instanceof String)
            addLayoutComponent((String)obj,comp);
        else
            addLayoutComponent(CENTER,comp);
    }

    public void addLayoutComponent
        (
        String    name,
        Component comp
       
        )
    {
        // default value
        if (name == null)
            name = CENTER;

        // find position and assign component
        for (int i = 0; i < 13; ++i)
        {
            if (name.equals(POS_NAME[i]))
            {
                m_comp[i] = comp;
                break;
            }
        }
    }

    public void removeLayoutComponent
        (
        Component comp
        )
    {
        // find position and assign component
        for (int i = 0; i < 13; ++i)
        {
            if (m_comp[i] == comp)
            {
                m_comp[i] = null;
                break;
            }
        }
    }

    public Dimension preferredLayoutSize
        (
        Container target
        )
    {
        return target.getSize();
    }

    public Dimension minimumLayoutSize
        (
        Container target
        )
    {
        return preferredLayoutSize(target);
    }

    public Dimension maximumLayoutSize
        (
        Container target
        )
    {
        return preferredLayoutSize(target);
    }

    public float getLayoutAlignmentX
        (
        Container parent
        )
    {
        return 0.5F;
    }

    public float getLayoutAlignmentY
        (
        Container parent
        )
    {
        return 0.5F;
    }

    public void invalidateLayout
        (
        Container target
        )
    {
        // not used
    }

    public void layoutContainer
        (
        Container target
        )
    {
        // get target container size
        Dimension dim = target.getSize();

        // get parameters
        Insets ins = target.getInsets();
        // compute center of area
        int h = (dim.height - ins.top  - ins.bottom) / 2;
        int w = (dim.width  - ins.left - ins.right)  / 2;

        // clockwise angle for this component
        double angle = 0.0;
        final double INCR = 0.52359877559; // 30 degrees in radians

        for (int i = 0; i < 13; ++i)
        {
            if ((m_comp[i] != null) && (m_comp[i].isVisible()))
            {
                // set component to its preferred size
                Dimension d = m_comp[i].getPreferredSize();
                m_comp[i].setSize(d);

                // coordinates for component
                int x, y;

                switch (i)
                {
                case 1:
                case 2:
                case 4:
                case 5:
                case 7:
                case 8:
                case 10:
                case 11:
                    // use sine law to compute coordinates
                    x = (int)(w + Math.sin(angle) * w - d.width / 2);
                    y = (int)(h - Math.sin(1.57079632679 - angle) * h - d.height / 2);
                    break;

                case 3:
                    // right side
                    x = 2 * w - d.width;
                    y = h - d.height / 2;
                    break;

                case 6:
                    // bottom
                    x = w - d.width  / 2;
                    y = 2 * h - d.height;
                    break;

                case 9:
                    // left side
                    x = 0;
                    y = h - d.height / 2;
                    break;

                case 12:
                    // top of area
                    x = w - d.width  / 2;
                    y = 0;
                    break;

                default: // put in center
                    x = w - d.width  / 2;
                    y = h - d.height / 2;
                }

                m_comp[i].setLocation(x + ins.left,y + ins.top);
            }

            angle += INCR;
        }
    }
}

-- 
Scott Robert Ladd
site: http://www.coyotegulch.com
blog: http://chaoticcoyote.blogspot.com






==========================================================================
TOPIC: emacs Vs Eclipse?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:45 am
From: "Will Hartung" <[EMAIL PROTECTED]> 


"Oliver Scholz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ville Vainio <[EMAIL PROTECTED]> writes:
>
> [...]
> > I'm a long time emacs user. The following article was an eye-opener,
> > of a sort, for me:
> >
> > http://pinard.progiciels-bpi.ca/opinions/editors.html
> [...]
>
> Could you expand on why you found that article convincing? To be
> honest, it seems a bit schizophrenic to me. I can make sense of it, if
> I read it as a statement of personal, idiosyncratic preferences.
> That's o.k., I have my own, different idiosyncracies.  But I don't
> understand how that could convince anybody else.

It didn't make any sense to me, as I don't see why one has to understand the
core deep implementation details of a tool to actually use it.

Take, for example, the Emacs JDE. The author of the JDE may need to
understand the intricacies of Emacs, but I sure don't.

I've been using emacs forever, and I simply don't use a VAST majority of its
capability. I don't use shell buffers, for example. I don't use GNUS, etc.

My .emacs file has TWO LINES that I put there on my own volition (one sets
the tab size to 4, the other disables ^X^C). It has a few more that the JDE
wanted when I installed it (even though I don't use it myself anymore).

I'm sure that the author of this article, as a maintainer of emacs, had a
much different view of the system than I do. He was involved in the politics
of emacs, I'm just an unbiased happy user.

So, as a testament that you can pretty much use emacs out of the box with
little fidgeting about, *wave* that's me.

Oh, and my emacs binary was compiled in 1999...I've never bothered to update
it.

Regards,

Will Hartung
([EMAIL PROTECTED])







==========================================================================
TOPIC: JMF and JMFREGISTRY
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ade340ef0d32c570
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:51 am
From: [EMAIL PROTECTED] (Chinmay) 

I am interested in refreshing the capture device list after I plugin a
new camera or remove an existing one.
I want to have this feature from within my application (instead of
asking the user to open JMFRegistry and refresh the capture device
list).
Is there any way to achieve this.? The only solution I can think of
now is to go through the JMFRegistry source code and see how it does
this.

Thanks,
Chinmay Dhodapkar




==========================================================================
TOPIC: Java Mail API
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb8d31b83e9393cf
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:58 am
From: "Will Hartung" <[EMAIL PROTECTED]> 

"Babu Kalakrishnan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I agree that you ought to accommodate DNS timeouts, but I cannot see
> another way to check if the hostname entered by the user is a valid SMTP
> host (I think that was the intent of the OP - not to validate the domain
> as such). To send out mail through that host, the system would have to
> open a TCP connection to port 25 of the host, and testing this
> beforehand by attempting to make that connection sounds like a
> reasonable approach.

Even if the connection succeeds you need to go farther. You can have a port
open on to an SMTP server, but that doesn't mean that it will actually take
your mail. You need to go a bit deeper into the protocol to verify that when
it comes time to send mail, it will actually accept it.

Regards,

Will Hartung
([EMAIL PROTECTED])







==========================================================================
TOPIC: Solved: XMLencoder custom
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/82bd7a799bc1f172
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 9:59 am
From: [EMAIL PROTECTED] (Yamin) 

Ok well I managed to find an easy way to do it :)  Sorry, the post
hasn't come up on google yet, so I can't reply to it directly.

All I did was subclass XMLEncoder.  I then override writeObject
method.  I check if the class I want is being written out via
instanceof.  If it is, I take the appropriate action.

Yamin




==========================================================================
TOPIC: Documentation for generics
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd3160390776af24
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 10:02 am
From: tom dailey <[EMAIL PROTECTED]> 

Does anyone know of any tutorial documentation on generics?
All I can find is Bracha's 7/5/04 paper, which is very brief,
and hard to understand in some parts. It's clearly time for
a 4th edition of The Java Programming Language, but I can't
find any notices that such an edition is forthcoming.

Thanks,
Tom Dailey





==========================================================================
TOPIC: Checksum java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 10:14 am
From: [EMAIL PROTECTED] (Alessio) 

> Please pay may wads of cash for consultancy, then I'd
> be happy to email, mail, or sky-write the answer for you.

if you pay me i'd suck you dick cause u need it for sure




==========================================================================
TOPIC: JTabbedPane size of Tabs
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8fa0800c935be979
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 10:30 am
From: "Daniel Grieves" <[EMAIL PROTECTED]> 

Two relatively easy possibilities--neither of which have I tried but it 
makes sense to me that they might work:
1) Try setting a tab icon of the height you want the tab to be.
2) Use html tags in your title

If neither of those tricks work, you'll probably have to write your own 
TabbedPaneUI.

Dan

"Leopard2" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi
>
> Does anyone know how to change hight of Tabs of a JTabbedPane ?
> MfG Markus 






==========================================================================
TOPIC: Awesome flash site... can swing do this?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3c6b95b8cc16c92
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 10:32 am
From: [EMAIL PROTECTED] (keith edward) 

Guys, 

I was looking at this flash app for intranet applications, where I can
ensure everyone has the plugin...

THE POINT WAS can anyone provide a similar web app built in swing? 

Does anyone really use swing for web apps anymore? Is swing dead?

Keith




==========================================================================
TOPIC: java data structure and algorithm libraries
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dee22584eabc2be8
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 10:56 am
From: "bdong" <[EMAIL PROTECTED]> 

Hello,

Are there any java data structure and algorithm libraries EXCEPT JDSL and
the default one in j2se?

Thanks






==========================================================================
TOPIC: refreshing the tree without collapsing the nodes
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/21aef518dd14affb
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 11:04 am
From: [EMAIL PROTECTED] (sgane) 

Hi friends,
          Hope this will be useful for some of you. While refreshing
the tree, the methode fireTreeStructureChanged will collapse the
exoanded nodes. to avoid this you can follow this,


Note : I have done this for nodes of type  <NodeName> <fileCount> 
[inbox (10)]

------------------------------------
                ...
                ...
                ...
                ...
                ...
                ...
DefaultMutableTreeNode rootNodeForRefresh =
                        getLastMatchedNodeForPath(
                                (DefaultMutableTreeNode) null,
                                new ModifiableBoolean(true),
                                curPath);

                FolderTreeModel ftm = (FolderTreeModel) getModel();
                rootNodeForRefresh.removeAllChildren();
                Collections.sort(folderNames);
                ftm.eatLastSlash(folderNames);
                ftm.makeChildren(rootNodeForRefresh, 0, folderNames);
                ftm.nodeStructureChanged(rootNodeForRefresh);
                
                /** @author sganesh
                 * The NodeStructureChanged medhod will collapse the expanded
                 * nodes. But we don't want it to collapse. So I'm getting the
expanded tree paths
                 * and comparing with the new tree Paths that are created after
collapsing.
                 * (I think the address of the tree nodes are changing after
collapsing, So doing so)
                 * Further while comparing we have to ignore the mailcounts. so
replacing them using RegEx
                 * comparision. 
                 */
                Enumeration newNodes = rootNodeForRefresh.preorderEnumeration();
                Vector newNodeVector = new Vector();
                while(newNodes.hasMoreElements()){
                        
newNodeVector.addElement(getPath((DefaultMutableTreeNode)newNodes.nextElement()));
                } 
                if((value.size() != 0) && (newNodeVector.size() != 0)){
                        String newPaths = newNodeVector.toString();
                        String regex = "\\([^)]*\\)";
                        newPaths = newPaths.replaceAll(regex, "");
                        newPaths = newPaths.substring(1,newPaths.length()-1);
                                        
                        String oldPaths = value.toString();
                        oldPaths = oldPaths.replaceAll(regex, "");
                        oldPaths = oldPaths.substring(1,oldPaths.length()-1);
                        
                        regex = "\\s\\]\\,";
                        newPaths = newPaths.replaceAll(regex, "^");
                        newPaths = newPaths.replaceAll("\\s\\[","");
                        newPaths = newPaths.substring(1,newPaths.length()-1).trim();
                        oldPaths = oldPaths.replaceAll(regex, "^");
                        oldPaths = oldPaths.replaceAll("\\s\\[","");
                        oldPaths = oldPaths.substring(1,oldPaths.length()-1).trim();
                        
                        StringTokenizer token = new StringTokenizer(newPaths,"^");
                        ArrayList newList = new ArrayList();
                        ArrayList oldList = new ArrayList();
                        while(token.hasMoreElements()){
                                newList.add(token.nextToken());
                        }
                        token = new StringTokenizer(oldPaths,"^");
                        while(token.hasMoreElements()){
                                oldList.add(token.nextToken());
                        }
                        int[] row  = new int[oldList.size()];
                        int j = 0;
                        for(int i = 0; i < newList.size(); i++){
                                if(oldList.contains(newList.get(i))){
                                        row[j] = i;
                                        j++; 
                                }
                        }
                                
                        Object temp = null;
                        collapsePath(path);
                        for(int i = 0; i < row.length; i++){
                                temp = newNodeVector.get(row[i]);
                                setExpandedState((TreePath)temp,true);
                        }
                }       
                clearSelection();
                setSelectionPath(path);




==========================================================================
TOPIC: Teaching resources
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/90b8d2e219def2a8
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 6 2004 11:08 am
From: "VisionSet" <[EMAIL PROTECTED]> 

I'm after some basic scenarios for teaching java.
Both from an OO perspective and from a structured programming perspective,
separately for simple scenarios.

For starters:

a problem that will be ideally solved by a simple loop, one using a
conditional and one using both, using just primitives.

and for OO something that lends itself to writing a simple class with one
attribute and a getter for that attribute.

I know this is simple stuff and my imagination should be up to it, but
actually as I've found it is extraordinarily difficult to come up with good
examples don't appear overly contrived and don't invite too many distracting
tangents.

Naturally I don't need the code but some resource that provides simple
problems such as these from the 1st steps in java, upto all the structured
programming capabilities and moderate OO ie introducing poymorphism.

Resources or your suggestions greatfully received :-)

-- 
Mike W
SCJP, SCJD
Self congratulation for a limited time only!





=======================================================================

You received this message because you are subscribed to the
Google Groups "comp.lang.java.programmer".  

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to