Site Sponsors:
Colorized JSR Listing 
We went looking for a list of active Java Specification Requests (JSRs) today. Specifically, we wanted to see which ones were okay, listed alongside of which ones were not.

We did not find what we needed, so we decided create a colorized listing of active and 'retired' JSRs for ourselves.

Submitted for your approval is perhaps the longest list we ever posted to any Wiki - let alone ours:

http://www.soft9000.com/service/noj.php?n=Java.JSR

Enjoy,

-Rn



[ view entry ] ( 890 views )   |  permalink  |  related link
Voice, Text, and HTML Logging 
Just a quick note to let everyone know that we just updated EzLog for Java.

Here is the project. (http://sourceforge.net/projects/ezlogforjava/)

EzLog4J now has the ability to capture voice notes, as well as our traditional Text and HTML meanderings.

Tested just fine across Linux (Ubuntu), OS X, and Windows.

Enjoy,

-Rn

[ view entry ] ( 2161 views )   |  permalink  |  related link
Order Of Operations 
When we set our layout *after* we have added our components, we do not need to use any of the size-oriented (setSize(), setPreferredSize(), setMaximumSize(), setMinimumSize()) operations:


import java.awt.CardLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
* Use the content of a panel for the main form. Application ends when a main form
* is closed.
*
* @author profnagy
*/
public class MainFrame extends JFrame implements Runnable {

public Thread pwThread = null;

public MainFrame(JPanel jPanel) {
super();
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
if (jPanel == null) {
JLabel lbl = new JLabel();
lbl.setText(this.getClass().getName());
this.add(lbl);
} else {
this.add(jPanel); // do this first -
}
this.setLayout(new CardLayout()); // the layout (queries all children), afterwards
this.pack();
com.soft9000.gui.Misc.ScreenCenter(this);
}

public void start() {
pwThread = new Thread(this);
pwThread.start();
this.setVisible(true);
}

public void run() {
}
}


So if you ever see that your window size does not work, check to see when we have applied our layout manager. In general, simply remember to assign the layout manager just before calling pack().

Enjoy,

-Rn

[ view entry ] ( 1827 views )   |  permalink

<<First <Back | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | Next> Last>>