태연님!!!

이런건 화면보호기로 만들어야 한다는거!!!

http://noriterm.ipop.co.kr/cgi-bin/noriter_flash_view.cgi?mid=5856231&nid=17626998


Posted by 밤치

2009/03/27 10:43 2009/03/27 10:43
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/123

XPath 삽질기

XPath로 Node를 찾아내려는데 div[ ] 라는 표현법을 사용할 수 있다.
Obejct[ ] 로 리턴해주기 때문에 [ ] 안의 숫자는 당연히 0 부터 시작할 줄 알았는데 1 부터 시작이더라..

결국 삽질 많이~ 했다는 이야기다.

Object[] obj = node.evaluateXPath("//body/div[3]/div[4]/div/div[11]/div/ul/li");

Posted by 밤치

2009/03/26 15:49 2009/03/26 15:49
, ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/120

TabbedPane Round처리 - BCRoundTabPanel

탭을 기준으로 둥근 모서리로 테두리를 그려주는 BCRoundTabPanel

사용자 삽입 이미지
사용자 삽입 이미지

BCRoundTabPanel 이 상단 이미지보다 작아질경우 아래와 같이 깨질수 있으니 주의!

사용자 삽입 이미지


import java.awt.Color;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class BCRoundTabPanel extends JPanel {
	private static final long serialVersionUID = 1L;

	int y;
	int r;
	int hr;
	int iconWidth;
	int iconHeight;
	Color c;

	ImageIcon topImg;

	public BCRoundTabPanel(ImageIcon imgIcon, int r) {
		this.topImg = imgIcon;
		this.r = r;
		hr = r / 2;
		y = topImg.getIconHeight();
		iconWidth = topImg.getIconWidth();
		iconHeight = topImg.getIconHeight();
	}

	@Override
	public void paint(Graphics g) {
		super.paintComponents(g);

		g.setColor(c);
		g.drawArc(0, getHeight() - r - 1, r, r, 180, 90);
		g.drawArc(getWidth() - r - 1, getHeight() - r - 1, r, r, 270, 90);
		g.drawArc(getWidth() - r - 1, iconHeight, r, r, 0, 90);
		g.drawLine(iconWidth, iconHeight, getWidth() - hr, iconHeight);
		g.drawLine(0, 0, 0, getHeight() - hr);
		g.drawLine(getWidth() - 1, iconHeight + hr, getWidth() - 1, getHeight() - hr - 1);
		g.drawLine(hr, getHeight() - 1, getWidth() - hr, getHeight() - 1);

		g.drawImage(topImg.getImage(), 0, 0, iconWidth, iconHeight, null);
	}

	public Color getC() {
		return c;
	}

	public void setC(Color c) {
		this.c = c;
	}
}

Posted by 밤치

2009/03/24 21:56 2009/03/24 21:56
, ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/118

« Previous : 1 : 2 : 3 : 4 : 5 : 6 : 7 : 8 : 9 : ... 33 : Next »